Skip to content
This repository has been archived by the owner on Nov 25, 2019. It is now read-only.

Commit

Permalink
Issue 254: HttpClient.PostAsJsonAsync and HttpClient.PostAsXmlAsync s…
Browse files Browse the repository at this point in the history
…hould set matching Accept header and have overload that takes System.Uri.

This commit adds missing overloads taking a System.Uri as HTTP request URI in addition to a string representation.

After further consideration we choose not to add accept header fields to match the request type so that PostAsJsonAsync sends an accept header of 'application/json' and PostAsXmlAsync sends an accept header of 'application/xml'. The reason is that some servers may react differently to an accept header, for example by returning a 406 status code instead. So rather than adding it implicitly, users can add it themselves if they so desire.
  • Loading branch information
henrikn committed Aug 21, 2012
1 parent 423bdea commit 5797924
Show file tree
Hide file tree
Showing 2 changed files with 667 additions and 35 deletions.

0 comments on commit 5797924

Please sign in to comment.