package http
- Alphabetic
- Public
- Protected
Type Members
- class Base64 extends AnyRef
A Base64 encoder/decoder.
A Base64 encoder/decoder.
This class is used to encode and decode data in Base64 format as described in RFC 1521.
Project home page: www.source-code.biz/base64coder/java
Author: Christian d'Heureuse, Inventec Informatik AG, Zurich, Switzerland
Multi-licensed: EPL / LGPL / GPL / AL / BSD / MIT. - class BaseHttp extends AnyRef
Extends and override this class to setup your own defaults
- case class ByteBodyConnectFunc(data: Array[Byte]) extends (HttpRequest, HttpURLConnection) => Unit with Product with Serializable
- 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)]) extends Product with Serializable
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]]) extends Product with Serializable
Result of executing a scalaj.http.HttpRequest
Result of executing a scalaj.http.HttpRequest
- T
the body response since it can be parsed directly to things other than String
- 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 with Product with Serializable
- case class MultiPart(name: String, filename: String, mime: String, data: InputStream, numBytes: Long, writeCallBack: (Long) => Unit) extends Product with Serializable
- case class MultiPartConnectFunc(parts: Seq[MultiPart]) extends (HttpRequest, HttpURLConnection) => Unit with Product with Serializable
- case class StringBodyConnectFunc(data: String) extends (HttpRequest, HttpURLConnection) => Unit with Product with Serializable
- case class Token(key: String, secret: String) extends Product with Serializable
- case class WwwAuthenticate(authType: String, params: Map[String, String]) extends Product with Serializable
Value Members
- case object BuildInfo extends Product with Serializable
This object was generated by sbt-buildinfo.
- case object DefaultConnectFunc extends (HttpRequest, HttpURLConnection) => Unit with Product with Serializable
- object DigestAuth
- case object FormBodyConnectFunc extends (HttpRequest, HttpURLConnection) => Unit with Product with Serializable
- object Http extends BaseHttp
Default entry point to this library
- object HttpConstants
Mostly helper methods
- object HttpOptions
Helper functions for modifying the underlying HttpURLConnection
- object MultiPart extends Serializable
- object OAuth
utility methods used by scalaj.http.HttpRequest
- case object PlainUrlFunc extends (HttpRequest) => String with Product with Serializable
- case object QueryStringUrlFunc extends (HttpRequest) => String with Product with Serializable
Simple http request library. Makes it easy to issue an http request and get a result.
Overview
The main entry point is the scalaj.http.Http singleton. Calling Http(url) will return an instance of scalaj.http.HttpRequest which you can use to build up your request. Execute the request by calling one of the asXXX methods and get a scalaj.http.HttpResponse which will contain the responseCode, body and response headers.
Usage Example