Net.HttpResponse
enum HttpResponseSourcecase HttpResponse({ body = Body, headers = Map[String, List[String]], status = Int32, url = String })An HTTP response with final URL, status code, multi-valued headers, and body.
Definitions
Returns the body of the response r as a string.
If the body is binary, it is decoded as UTF-8.
Returns the body of the response r as bytes.
If the body is text, it is encoded as UTF-8.
Returns the value of the content-length header parsed as an Int64, or None if not present or not a valid number.
Returns the value of the content-type header, or None if not present.
Returns Ok(r) if the response status is in the 2xx range, or Err otherwise.
Returns the list of values for the header with the given name, or None if not present.
Returns the first value of the header with the given name, or None if not present.
Returns the headers of the response r.
Returns true if the response status is in the 4xx range.
Returns true if the response status is in the 4xx or 5xx range.
Returns true if the response status is in the 3xx range.
Returns true if the response status is in the 5xx range.
Returns true if the response status is in the 2xx range.