Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dimitrietataru/csharp-api-request
C# API Request
https://github.com/dimitrietataru/csharp-api-request
api-request csharp delete dot-net-core dot-net-core-web-api get httpclient httpclientfactory net-5 net-core-3-1 patch post put
Last synced: 7 days ago
JSON representation
C# API Request
- Host: GitHub
- URL: https://github.com/dimitrietataru/csharp-api-request
- Owner: dimitrietataru
- License: mit
- Created: 2020-07-27T09:40:39.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-11-18T09:10:56.000Z (almost 4 years ago)
- Last Synced: 2023-04-29T08:11:31.365Z (over 1 year ago)
- Topics: api-request, csharp, delete, dot-net-core, dot-net-core-web-api, get, httpclient, httpclientfactory, net-5, net-core-3-1, patch, post, put
- Language: C#
- Homepage:
- Size: 184 KB
- Stars: 4
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# C# API Request
## Install
``` powershell
PM> Install-Package Microsoft.AspNet.WebApi.Client -Version 5.2.7
PM> Install-Package Microsoft.Extensions.DependencyInjection.Abstractions -Version 5.0.0
PM> Install-Package Microsoft.Extensions.Http -Version 5.0.0
```## APIs
| API | HTTPS port | HTTP port |
|:---:|:---:|:---:|
| Foo API | 42000 | 42001 |
| Bar API | 43000 | 43001 |## Test endpoints
| Route | HttpVerb | Requires Body | Has Response | Status Code |
|:---|:---:|:---:|:---:|:---|
| api/v1/bar/get-with-response | GET | | ✓ | 200 (OK) |
| api/v1/bar/get-without-response | GET | | | 204 (No Content) |
| api/v1/bar/post-with-body-and-with-response | POST | ✓ | ✓ | 200 (OK) |
| api/v1/bar/post-with-body-and-without-response | POST | ✓ | | 204 (No Content) |
| api/v1/bar/post-without-body-and-with-response | POST | | ✓ | 200 (OK) |
| api/v1/bar/post-without-body-and-without-response | POST | | | 204 (No Content) |
| api/v1/bar/put-with-body-and-with-response | PUT | ✓ | ✓ | 200 (OK) |
| api/v1/bar/put-with-body-and-without-response | PUT | ✓ | | 204 (No Content) |
| api/v1/bar/put-without-body-and-with-response | PUT | | ✓ | 200 (OK) |
| api/v1/bar/put-without-body-and-without-response | PUT | | | 204 (No Content) |
| api/v1/bar/patch-with-body-and-with-response | PATCH | ✓ | ✓ | 200 (OK) |
| api/v1/bar/patch-with-body-and-without-response | PATCH | ✓ | | 204 (No Content) |
| api/v1/bar/patch-without-body-and-with-response | PATCH | | ✓ | 200 (OK) |
| api/v1/bar/patch-without-body-and-without-response | PATCH | | | 204 (No Content) |
| api/v1/bar/delete-with-response | DELETE | | ✓ | 200 (OK) |
| api/v1/bar/delete-without-response | DELETE | | | 204 (No Content) |
| api/v1/foo/get-with-response | GET | | ✓ | 200 (OK) |
| api/v1/foo/get-without-response | GET | | | 204 (No Content) |
| api/v1/foo/post-with-body-and-with-response | POST | ✓ | ✓ | 200 (OK) |
| api/v1/foo/post-with-body-and-without-response | POST | ✓ | | 204 (No Content) |
| api/v1/foo/post-without-body-and-with-response | POST | | ✓ | 200 (OK) |
| api/v1/foo/post-without-body-and-without-response | POST | | | 204 (No Content) |
| api/v1/foo/put-with-body-and-with-response | PUT | ✓ | ✓ | 200 (OK) |
| api/v1/foo/put-with-body-and-without-response | PUT | ✓ | | 204 (No Content) |
| api/v1/foo/put-without-body-and-with-response | PUT | | ✓ | 200 (OK) |
| api/v1/foo/put-without-body-and-without-response | PUT | | | 204 (No Content) |
| api/v1/foo/patch-with-body-and-with-response | PATCH | ✓ | ✓ | 200 (OK) |
| api/v1/foo/patch-with-body-and-without-response | PATCH | ✓ | | 204 (No Content) |
| api/v1/foo/patch-without-body-and-with-response | PATCH | | ✓ | 200 (OK) |
| api/v1/foo/patch-without-body-and-without-response | PATCH | | | 204 (No Content) |
| api/v1/foo/delete-with-response | DELETE | | ✓ | 200 (OK) |
| api/v1/foo/delete-without-response | DELETE | | | 204 (No Content) |