Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nikiforovall/http-sdk-guide
A comprehensive guide on how to write HTTP Client SDKs in .NET
https://github.com/nikiforovall/http-sdk-guide
api dotnet dotnetcore microservices rest-api
Last synced: 2 months ago
JSON representation
A comprehensive guide on how to write HTTP Client SDKs in .NET
- Host: GitHub
- URL: https://github.com/nikiforovall/http-sdk-guide
- Owner: NikiforovAll
- Created: 2021-12-31T09:51:03.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-07-19T17:01:51.000Z (over 2 years ago)
- Last Synced: 2024-10-10T19:40:14.459Z (3 months ago)
- Topics: api, dotnet, dotnetcore, microservices, rest-api
- Language: C#
- Homepage: https://nikiforovall.github.io/dotnet/aspnetcore/microservices/2022/04/04/creating-and-using-http-sdks.html
- Size: 3.33 MB
- Stars: 19
- Watchers: 4
- Forks: 8
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# HttpClientSdk
A practical example of how to write HTTP Client SDKs in .NET.
API used for testing: https://rapidapi.com/KegenGuyll/api/dad-jokes/
```bash
$ dotnet example# ┌──────────────────────────────────┬──────────────────────────────────────────────────────────────────────────────┐
# │ Example │ Description │
# ├──────────────────────────────────┼──────────────────────────────────────────────────────────────────────────────┤
# │ httpclient.api-host │ MinimalAPI + IHttpClientFactory + HttpClient (HttpClient) │
# │ cross-cutting.delegating-handler │ MinimalAPI + IHttpClientFactory + DelegatingHandler (Cross Cutting Concerns) │
# │ cross-cutting.polly │ MinimalAPI + IHttpClientFactory + DelegatingHandler (Cross Cutting Concerns) │
# │ httpclient.console-di-host │ Console + IHttpClientFactory + HttpClient (HttpClient) │
# │ httpclient.console-host │ Console + HttpClient (HttpClient) │
# │ refit.api-host │ MinimalAPI + IHttpClientFactory + Refit (Refit) │
# │ nswag.api-host │ MinimalAPI + IHttpClientFactory + NSwag (NSwag) │
# └──────────────────────────────────┴──────────────────────────────────────────────────────────────────────────────┘
```## Provide Token
All examples assumes you to provide apiKey through environment variables, you can do it like this: `export DADJOKES_TOKEN=`.