Commit Graph
5 Commits
Author SHA1 Message Date
Layomi Akinrinade edade17c28 Add Put/Post methods to HttpClientJsonExtensions that take type metadata (#51609)
* Add Put/Get methods to HttpClientJsonExtensions that take type metadata

* Make JsonContentOfT derive directly from HttpContent

* Fix linker error

* Rename Helper to JsonHelpers
2021-04-22 00:42:24 +00:00
Layomi Akinrinade 24966ab54e [JSON source gen 3/3] Add new methods to JsonSerializer and System.Net.Http.Json APIs that take type metadata (#51528)
* Add new methods to JsonSerializer and System.Net.Http.Json APIs that take type metadata

* Address review feedback
2021-04-20 22:45:26 +00:00
Stephen Toub e7204f5d6f Use T? for unconstrained nullable types (#40197)
* Temporarily upgrade compiler version for T? support

* Use T? for unconstrained nullable types
2020-08-07 11:25:42 -04:00
Stephen Toub 6072e4d3a7 Update license headers (#38793) 2020-07-08 09:23:11 -04:00
David CantuandJose Perez Rodriguez c6d463c7ea Add new System.Net.Http.Json project/namespace (#33459)
* Add System.Net.Http.Json related projects

* Add JsonContent, HttpContent extensions, and tests.

* Rename PErson.cs to Person.cs

* Adding package for System.Net.Http.Json library

* Improve tests, minor fixes and code clean-up.

* Remove annotations and code clean-up.

* Add draft description and common types to NuGet pkg.

* Addres nullability issues on API surface area.

* Add missing configurations to projects

* Addressing most of the  feedback.
TODO: Implement transcoding for non-UTF-8 content.

* Fix csproj formatting and use open StrongNameKeyId

* Address API review comments.

* Add transcoding support for .NET 5

* Port TranscodingRead/WriteStream to netstandard2.0

* Remove netcoreapp dependencies on TranscodingStream classes.

* Mark TransportContext as nullable to fix CI issues.

* Addres issues raised by new nullablity awareness code in System.Net.Http

* Re-enable LoopBackServer tests, address suggestions and code clean-up.

* Use default JsonSerializerOptions when passed-in is null

* Escape a few remaining Unicode characters in test files.

* Address nits.

* Validate inputType.IsAssignableFrom(inputValue.GetType()) on JsonContent ctor.

* Allow only ContentTypes application/json and application/<subtype>+json.

* Address comments.

* Add Unit.Tests project

* Make mediaType argument optional on JsonContent.Create

* Address latest comments.

* Perform case-insensitive comparisons on MediaType instead of ToLower.

* Address comments related to Transcoding classes.

* Address feedback

* Document TranscodingWriteStream.MaxByteBufferSize

* Replace MediaTypeHeaderValue.Parse with .ctor since it performs better.

Co-authored-by: Jose Perez Rodriguez <[email protected]>
2020-03-25 23:10:04 -07:00