Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/davidfowl/owinhttpclient
Barebones http client that uses the owin interface built on .NET socket API.
https://github.com/davidfowl/owinhttpclient
Last synced: about 2 months ago
JSON representation
Barebones http client that uses the owin interface built on .NET socket API.
- Host: GitHub
- URL: https://github.com/davidfowl/owinhttpclient
- Owner: davidfowl
- License: other
- Created: 2013-02-11T23:26:33.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2013-09-07T07:10:36.000Z (over 11 years ago)
- Last Synced: 2024-10-15T05:28:16.388Z (2 months ago)
- Language: C#
- Size: 234 KB
- Stars: 48
- Watchers: 9
- Forks: 14
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# OwinHttpClient
A bare bones, low ceremony, http client. There's a single method, Invoke that takes an owin environment
that gets mutated with the response when the call to invoke is completed.### Middleware
The client takes advantage of Owin middleware to build up functionality. This of course is completely optional but the list of default
middleware supports making http requests via sockets, ssl support, gzipped responses, handling automatic redirects and more...See the list of middlware [here](https://github.com/davidfowl/OwinHttpClient/tree/master/Owin.Client/Middleware)
**NOTE: The api is still in flux and it will be until it feels right.**
### Sample
The sample uses Owin.Types from http://www.myget.org/F/owin/ for OwinResponse.
```csharp
var env = RequestBuilder.Get("http://www.reddit.com");var client = new OwinHttpClient();
await client.Invoke(env);
var response = new OwinResponse(env);
var reader = new StreamReader(response.Body);
Console.WriteLine(await reader.ReadToEndAsync());
```