Skip to content

Latest commit

 

History

History
62 lines (48 loc) · 7.03 KB

File metadata and controls

62 lines (48 loc) · 7.03 KB

Documentation common methods/properties

These are not all, just the most useful!

Creating an HttpClientService, or using the singleton

Setting IdentityServer options and Headers (HttpClientService)

The System.Net.HttpStatusCode of the response.

Extension methods for GET, POST, PUT and DELETE

Defining a typed request body with content-type

  • TypeContent TypeContent is following the implementation of StringContent. e.g. new TypeContent(your-complex-type, Encoding.UTF8, "application/json");

ResponseObject properties

  • BodyAsStream The body of the response as System.IO.Stream.
  • BodyAsString The body of the response as System.String.
  • BodyAsType The body of the response converted to TResponseBody.
  • Error A description of the error, if any.
  • HasError A boolean indicating if there is an error in the current request.
  • Headers The System.Net.Http.Headers.HttpResponseHeaders.
  • HttpRequestMessge The entire System.Net.Http.HttpRequestMessage object for debugging purposes.
  • HttpResponseMessge The entire System.Net.Http.HttpResponseMessage object.
  • StatusCode