Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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) |