the Http response body
the http response code from the status line
Content-Type header value
Get the parsed cookies from the "Set-Cookie" header *
Get the response header value for a key
Get all the response header values for a repeated key
the response headers
is response code 2xx
is response code 3xx
is response code 4xx
is response code 5xx
same as is4xx
test if code is in beteween lower and upper inclusive
same as (is4xx || is5xx)
same as !isError
same as is3xx
same as is5xx
same as is2xx
Location header value sent for redirects.
Location header value sent for redirects. By default, this library will not follow redirects.
The full status line.
The full status line. like "HTTP/1.1 200 OK" throws a RuntimeException if "Status" is not in headers
Throw a
Throw a
scalaj.http.HttpStatusException}} if
{{{isError
is true. Otherwise returns reference to self
Useful if you don't want to handle 4xx or 5xx error codes from the server and just want bubble up an Exception instead. HttpException.body will just be body.toString.
Allows for chaining like this:
val result: String = Http(url).asString.throwError.body
Throw a
Throw a
scalaj.http.HttpStatusException}} if
{{{isServerError
is true. Otherwise returns reference to self
Useful if you don't want to 5xx error codes from the server and just want bubble up an Exception instead. HttpException.body will just be body.toString.
Allows for chaining like this:
val result: String = Http(url).asString.throwServerError.body
Result of executing a HttpRequest
the body response since it can be parsed directly to things other than String
the Http response body
the http response code from the status line
the response headers