tunnelvisionlabs / dotnet-httpclient35 Goto Github PK
View Code? Open in Web Editor NEWA complete port of Mono's System.Net.Http assembly to .NET 3.5
License: Other
A complete port of Mono's System.Net.Http assembly to .NET 3.5
License: Other
In a manner similar to the Rackspace.Collections.Immutable library, the public types in this assembly should provide [TypeForwardedTo]
attributes to support upgrading to newer (framework-provided) versions of the HttpClient
library without recompiling code.
After this library was originally created, the Microsoft implementation of the same functionality was released under a compatible open source license. The current implementation should be replaced by the new one, while retaining the same public API.
On .net 3.5, if request have a content, the RequestStream on WebRequest is not closed/disposed. So the actual request hang indefinitely. If the copy request task is wrapped in using, everything works as expected.
Here is the demo console app
https://gist.github.com/sonicflare/c53adaf904fee86a6c340b90946677de
The problem is on this line
https://github.com/tunnelvisionlabs/dotnet-httpclient35/blob/master/System.Net.Http/System.Net.Http/HttpClientHandler.cs#L320
And if the code is changed to this, request is going ok
.Then(streamTask =>
{
using (var stream = streamTask.Result)
{
return request.Content.CopyToAsync(stream);
}
});
The name of the compiled binary is System.Net.Http.dll. This name is the same as the binary provided in the Microsoft.Net.Http package, which makes it difficult to seamlessly upgrade the reference without recompiling the code. This package should use the same strategy as the Rackspace.Collections.Immutable package to support upgrading clients without recompilation.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.