HttpResponse
Result of executing a scalaj.http.HttpRequest
- Type Params
- T
the body response since it can be parsed directly to things other than String
- Value Params
- body
the Http response body
- code
the http response code from the status line
- headers
the response headers
Value members
Concrete methods
Get the parsed cookies from the "Set-Cookie" header *
Get the parsed cookies from the "Set-Cookie" header *
Get all the response header values for a repeated key
Get all the response header values for a repeated key
test if code is in between lower and upper inclusive
test if code is in between lower and upper inclusive
Location header value sent for redirects. By default, this library will not follow redirects.
Location header value sent for redirects. By default, this library will not follow redirects.
The full status line. like "HTTP/1.1 200 OK" throws a RuntimeException if "Status" is not in headers
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
scalaj.http.HttpStatusException}} if {{{isError }}}
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
scalaj.http.HttpStatusException}} if {{{isServerError }}}
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