Skip to content

Latest commit

 

History

History
25 lines (17 loc) · 667 Bytes

sample-usage.md

File metadata and controls

25 lines (17 loc) · 667 Bytes

Sample REST API usage with cUrl

Get a customer

curl -s -X GET http://localhost:5000/customer/123

Create new customer

curl -s -X PUT http://localhost:5000/customer -d 'customer={"CustomerName": "John Doe", "PhoneNumber": "123-234-5678", "FaxNumber": "123-234-5678", "WebsiteURL": "http://www.something.com", "Delivery": { "AddressLine1": "One Microsoft Way", "PostalCode": 98052 }}'

Update customer

curl -s -X PATCH http://localhost:5000/customer/123 -d 'customer={"CustomerName": "Jane Dean", "PhoneNumber": "231-778-5678" }'

Delete a customer

curl -s -X DELETE http://localhost:5000/customer/123