Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/calebmadrigal/web-api-test
.NET WebAPI Test
https://github.com/calebmadrigal/web-api-test
Last synced: about 1 month ago
JSON representation
.NET WebAPI Test
- Host: GitHub
- URL: https://github.com/calebmadrigal/web-api-test
- Owner: calebmadrigal
- License: mit
- Created: 2014-08-28T18:07:26.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2014-08-29T16:32:27.000Z (about 10 years ago)
- Last Synced: 2024-04-15T06:53:54.133Z (7 months ago)
- Language: C#
- Size: 164 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# web-api-test
Demonstrates how to build a simple RESTful API with .NET WebAPI.
## Usage
### List
curl http://localhost:49990/api/product
Example Response:
{
"Data": [
{
"id": "0",
"name": "Chai"
},
{
"id": "1",
"name": "Espresso"
},
{
"id": "2",
"name": "Smoothie"
}
]
}### Get
curl http://localhost:49990/api/product/1
Example response:
{
"Data": {
"id": "1",
"name": "Espresso"
}
}### Create
curl -X POST http://localhost:49990/api/product -H "Content-Type: application/json" -d "{'name': 'Juice'}"
### Update
curl -X PUT http://localhost:49990/api/product/1 -H "Content-Type: application/json" -d "{'name': 'Juice'}"