0% found this document useful (0 votes)
96 views

Post To Create Northwind Product Using HTTP Adapter (JSON and XML)

This document provides instructions for posting new product data to the Northwind database using either the HTTP adapter or the OData adapter. It includes the base, metadata, and post URLs needed, as well as examples of the XML and JSON payload formats for creating new products.

Uploaded by

Akash Saini
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
96 views

Post To Create Northwind Product Using HTTP Adapter (JSON and XML)

This document provides instructions for posting new product data to the Northwind database using either the HTTP adapter or the OData adapter. It includes the base, metadata, and post URLs needed, as well as examples of the XML and JSON payload formats for creating new products.

Uploaded by

Akash Saini
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

1.

Post to Create Northwind Products using HTTP adapter


2. Post to Create Northwind Products using OData adapter

Base url
https://services.odata.org/

Metadata url
https://services.odata.org/V2/(S(northwind-id))/OData/OData.svc/$metadata

Get url
https://services.odata.org/V2/(S(northwind-id))/OData/OData.svc/Products?
$format=atom
https://services.odata.org/V2/(S(northwind-id))/OData/OData.svc/Products?
$format=json

Post url
https://services.odata.org/V2/(S(northwind-id))/OData/OData.svc/Products

Post xml
<entry xml:base="https://services.odata.org/(S(northwind-id))/V2/OData/OData.svc/"
xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices"
xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"
xmlns="http://www.w3.org/2005/Atom">
<content type="application/xml">
<m:properties>
<d:ID>50</d:ID>
<d:Name>Monitor</d:Name>
<d:Description>4K LED Monitor</d:Description>
<d:ReleaseDate>2010-05-08T00:00:00</d:ReleaseDate>
<d:Rating>1</d:Rating>
<d:Price>999</d:Price>
</m:properties>
</content>
</entry>

Post Json
{
"ID": 51,
"Name": "Keyboard",
"Description": "Normal Keyboard",
"ReleaseDate": "2005-01-01T00:00:00",
"DiscontinuedDate": null,
"Rating": 4,
"Price": "10.5"
}

You might also like