scalaj.http

package scalaj.http

Type members

Classlikes

class BaseHttp(proxyConfig: Option[Proxy], options: Seq[HttpOption], charset: String, sendBufferSize: Int, userAgent: String, compress: Boolean)

Extends and override this class to setup your own defaults

Extends and override this class to setup your own defaults

Value Params
charset

charset to use for encoding request and decoding response

compress

use HTTP Compression

options

set things like timeouts, ssl handling, redirect following

proxyConfig

http proxy; defaults to the Java default proxy (see http://docs.oracle.com/javase/8/docs/technotes/guides/net/proxies.html). You can use scalaj.http.HttpConstants.proxy to specify an alternate proxy, or specify java.net.Proxy.NO_PROXY to explicitly use not use a proxy.

sendBufferSize

buffer size for multipart posts

userAgent

User-Agent request header

case
object BuildInfo

This object was generated by sbt-buildinfo.

This object was generated by sbt-buildinfo.

case
class ByteBodyConnectFunc(data: Array[Byte]) extends (HttpRequest, HttpURLConnection) => Unit
case
object DefaultConnectFunc extends (HttpRequest, HttpURLConnection) => Unit
object DigestAuth
case
object FormBodyConnectFunc extends (HttpRequest, HttpURLConnection) => Unit
object Http extends BaseHttp

Default entry point to this library

Default entry point to this library

Mostly helper methods

Mostly helper methods

Helper functions for modifying the underlying HttpURLConnection

Helper functions for modifying the underlying HttpURLConnection

case
class HttpRequest(url: String, method: String, connectFunc: HttpExec, params: Seq[(String, String)], headers: Seq[(String, String)], options: Seq[HttpOption], proxyConfig: Option[Proxy], charset: String, sendBufferSize: Int, urlBuilder: HttpRequest => String, compress: Boolean, digestCreds: Option[(String, String)])

Immutable builder for creating an http request

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

.copy(params=newparams)
case
class HttpResponse[T](body: T, code: Int, headers: Map[String, IndexedSeq[String]])

Result of executing a scalaj.http.HttpRequest

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

case
class HttpStatusException(code: Int, statusLine: String, body: String) extends RuntimeException
object MultiPart
Companion
class
case
class MultiPart(name: String, filename: String, mime: String, data: InputStream, numBytes: Long, writeCallBack: Long => Unit)
Companion
object
case
class MultiPartConnectFunc(parts: Seq[MultiPart]) extends (HttpRequest, HttpURLConnection) => Unit
object OAuth

utility methods used by scalaj.http.HttpRequest

utility methods used by scalaj.http.HttpRequest

case
object PlainUrlFunc extends HttpRequest => String
case
object QueryStringUrlFunc extends HttpRequest => String
case
class StringBodyConnectFunc(data: String) extends (HttpRequest, HttpURLConnection) => Unit
case
class Token(key: String, secret: String)
case
class WwwAuthenticate(authType: String, params: Map[String, String])