https://github.com/gsscoder/httphelpers
HTTP Helpers for C# / .NET
https://github.com/gsscoder/httphelpers
Last synced: 8 months ago
JSON representation
HTTP Helpers for C# / .NET
- Host: GitHub
- URL: https://github.com/gsscoder/httphelpers
- Owner: gsscoder
- Created: 2013-02-12T15:21:49.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2013-02-16T21:10:56.000Z (almost 13 years ago)
- Last Synced: 2025-03-26T12:51:10.313Z (11 months ago)
- Language: C#
- Homepage:
- Size: 1.77 MB
- Stars: 8
- Watchers: 7
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Http Helpers 0.1.6.0 alfa.
===
Easy to use, one method based, asynchronous HTTP request/response parser. It contains also a synchronous version;
none of versions wraps the other, there are two independent implementations.

At glance:
---
```csharp
Stream stream = new MemoryStream(Encoding.UTF8.GetBytes(
"GET /gsscoder/httphelpers HTTP/1.1\r\n" +
"Content-Type: text/html; q=0.9, text/plain\r\n\r\n"));
bool result = await HttpParser.ParseMessageAsync(stream, (method, uri, version) =>
{
Debug.WriteLine(method);
Debug.WriteLine(uri);
Debug.WriteLine(version);
},
(header, value) =>
Debug.WriteLine(header + " " + value);
// When parsing a response, just name heading-line lambda parameters:
// version, code and reason.
// For the body: just read remaining bytes from the stream.
```
News:
---
- Increased tests coverage.
- Fixed an issue with ``NO_ASYNC_API`` compilation symbol.
Resources:
---
- [Unit Tests](https://github.com/gsscoder/httphelpers/blob/master/src/HttpHelpers.Tests/Unit)
- [Sample web server](https://gist.github.com/gsscoder/4945688) (now included in the solution tree)
- [Owin HTTP Listener](https://github.com/gsscoder/owinhttplistener) (work in progress)
Contacts:
---
Giacomo Stelluti Scala
- gsscoder AT gmail DOT com
- [Blog](http://gsscoder.blogspot.it)
- [Twitter](http://twitter.com/gsscoder)