Execute this request and parse http body as Array[Byte]
Execute this request and parse http body as query string key-value pairs
Execute this request and parse http body as query string key-value pairs
Execute this request and parse http body as String using configured charset
Execute this request and parse http body as a querystring containing oauth_token and oauth_token_secret tupple
Add a standard basic authorization header
Change the charset used to encode the request and decode the response.
Change the charset used to encode the request and decode the response. UTF-8 by default
Should HTTP compression be used If true, Accept-Encoding: gzip,deflate will be sent with request.
Should HTTP compression be used If true, Accept-Encoding: gzip,deflate will be sent with request. If the server response with Content-Encoding: (gzip|deflate) the client will automatically handle decompression
This is on by default
should compress
Add Cookie header to the request
Add Cookie header to the request
Add multiple cookies to the request.
Add multiple cookies to the request. Usefull for round tripping cookies from HttpResponse.cookies
Executes this request
Executes this request
This is a power user method for parsing the response body. The parser function will be passed the response code, response headers and the InputStream
the type returned by the input stream parser
function to process the response body InputStream
Executes this request
Executes this request
Keep in mind that if you're parsing the response to something other than String, you may hit parsing error if the server responds with a different content type for error cases.
the type returned by the input stream parser
function to process the response body InputStream. Will be used for all response codes
Add a http header to the request
Add http headers to the request
Add http headers to the request
Add http headers to the request
Change the http request method.
Change the http request method. The library will allow you to set this to whatever you want. If you want to do a POST, just use the postData, postForm, or postMulti methods. If you want to setup your request as a form, data or multi request, but want to change the method type, call this method after the post method:
Http(url).postData(dataBytes).method("PUT").asString
OAuth v1 sign the request with with both the consumer and client token and a verifier
OAuth v1 sign the request with with both the consumer and client token and a verifier
OAuth v1 sign the request with with both the consumer and client token
OAuth v1 sign the request with the consumer token
Entry point fo modifying the java.net.HttpURLConnection before the request is executed
Entry point fo modifying the java.net.HttpURLConnection before the request is executed
Entry point fo modifying the java.net.HttpURLConnection before the request is executed
Add a param to the GET querystring or POST form request
Add params to the GET querystring or POST form request
Add params to the GET querystring or POST form request
Add params to the GET querystring or POST form request
Raw byte data POST request
Raw data POST request.
Raw data POST request. String bytes written out in using configured charset
Standard form POST request and set some parameters.
Standard form POST request and set some parameters. Same as .postForm.params(params)
Standard form POST request
Multipart POST request.
Multipart POST request.
This is probably what you want if you need to upload a mix of form data and binary data (like a photo)
Send request via a proxy
Send request via a proxy.
Send request via a proxy. You choose the type (HTTP or SOCKS)
Send request via a standard http proxy
The buffer size to use when sending Multipart posts
The socket connection and read timeouts in milliseconds.
The socket connection and read timeouts in milliseconds. Defaults are 1000 and 5000 respectively
Immutable builder for creating an http request
This is the workhorse of the scalaj-http library.
You shouldn't need to construct this manually. Use scalaj.http.Http.apply to get an instance
The params, headers and options methods are all additive. They will always add things to the request. If you want to replace those things completely, you can do something like