Skip to content

Commit 3c2c5df

Browse files
committed
added curl samples
1 parent d5d0407 commit 3c2c5df

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

Sample-Usage.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Sample REST API usage with cUrl
2+
3+
## Get a customer
4+
5+
```bash
6+
curl -s -k -X GET https://localhost:5001/customer/121
7+
```
8+
9+
## Create new customer
10+
11+
```bash
12+
curl -s -k -H "Content-Type: application/json" -X PUT https://localhost:5001/customer -d '{"CustomerName": "John Doe", "PhoneNumber": "123-234-5678", "FaxNumber": "123-234-5678", "WebsiteURL": "http://www.something.com", "Delivery": { "AddressLine1": "One Microsoft Way", "PostalCode": 98052 }}'
13+
```
14+
15+
## Update customer
16+
17+
```bash
18+
curl -s -k -H "Content-Type: application/json" -X PATCH http://localhost:5000/customer/123 -d '{"CustomerName": "Jane Dean", "PhoneNumber": "231-778-5678" }'
19+
```
20+
21+
## Delete a customer
22+
23+
```bash
24+
curl -s -k -X DELETE http://localhost:5000/customer/123
25+
```

0 commit comments

Comments
 (0)