HttpClient

spice.http.client.HttpClient
See theHttpClient companion class
object HttpClient extends HttpClient

Attributes

Companion
class
Graph
Supertypes
trait Product
trait Mirror
class HttpClient
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Self type
HttpClient.type

Members list

Type members

Inherited types

type MirroredElemLabels <: Tuple

The names of the product elements

The names of the product elements

Attributes

Inherited from:
Mirror
type MirroredLabel <: String

The name of the type

The name of the type

Attributes

Inherited from:
Mirror

Value members

Inherited methods

def appendParams(params: (String, String)*): HttpClient

Attributes

Inherited from:
HttpClient
def call[Response : RW]: IO[Response]

Builds on the send method by supporting basic restful calls that calls a URL and returns a case class as the response.

Builds on the send method by supporting basic restful calls that calls a URL and returns a case class as the response.

Type parameters

Response

the response type

Attributes

Returns

Response

Inherited from:
HttpClient
def callTry[Response : RW]: IO[Try[Response]]

Builds on the send method by supporting basic restful calls that calls a URL and returns a case class as the response.

Builds on the send method by supporting basic restful calls that calls a URL and returns a case class as the response.

Type parameters

Response

the response type

Attributes

Returns

Try[Response]

Inherited from:
HttpClient

Attributes

Inherited from:
HttpClient

Attributes

Inherited from:
HttpClient
def content(content: Option[Content]): HttpClient

Sets the content to be sent optionally. If this request is set to GET, it will automatically be changed to POST.

Sets the content to be sent optionally. If this request is set to GET, it will automatically be changed to POST.

Value parameters

content

the content to set - if None, nothing will be changed

Attributes

Returns

HttpClient

Inherited from:
HttpClient
def content(content: Content): HttpClient

Sets the content to be sent. If this request is set to GET, it will automatically be changed to POST.

Sets the content to be sent. If this request is set to GET, it will automatically be changed to POST.

Value parameters

content

the content to set

Attributes

Returns

HttpClient

Inherited from:
HttpClient
def dispose(): IO[Unit]

Attributes

Inherited from:
HttpClient
def dns(dns: DNS): HttpClient

Attributes

Inherited from:
HttpClient
def dropNullValuesInJson(dropNullValuesInJson: Boolean): HttpClient

Attributes

Inherited from:
HttpClient
def failOnHttpStatus(failOnHttpStatus: Boolean): HttpClient

Attributes

Inherited from:
HttpClient

Attributes

Inherited from:
HttpClient
def header(key: String, value: String, replace: Boolean): HttpClient

Attributes

Inherited from:
HttpClient
def header(key: String, value: String): HttpClient

Attributes

Inherited from:
HttpClient
def header(header: Header, replace: Boolean): HttpClient

Attributes

Inherited from:
HttpClient
def header(header: Header): HttpClient

Attributes

Inherited from:
HttpClient
def headers(headers: Headers, replace: Boolean): HttpClient

Attributes

Inherited from:
HttpClient

Attributes

Inherited from:
HttpClient
def interceptor(interceptor: Interceptor): HttpClient

Attributes

Inherited from:
HttpClient
def json(json: Json): HttpClient

Convenience method to sending JSON content.

Convenience method to sending JSON content.

Value parameters

json

the JSON content to send

Attributes

Returns

HttpClient

Inherited from:
HttpClient
def method(method: HttpMethod): HttpClient

Attributes

Inherited from:
HttpClient
def method: HttpMethod

Attributes

Inherited from:
HttpClient
def modify(f: HttpRequest => HttpRequest): HttpClient

Attributes

Inherited from:
HttpClient

Attributes

Inherited from:
HttpClient
def param[T](name: String, value: T, default: T): HttpClient

Attributes

Inherited from:
HttpClient
def params(params: (String, String)*): HttpClient

Attributes

Inherited from:
HttpClient
def path(path: URLPath, append: Boolean): HttpClient

Attributes

Inherited from:
HttpClient
def path: URLPath

Attributes

Inherited from:
HttpClient
def pingInterval(pingInterval: Option[FiniteDuration]): HttpClient

Attributes

Inherited from:
HttpClient

Attributes

Inherited from:
HttpClient
def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product
def proxy(proxy: Proxy): HttpClient

Attributes

Inherited from:
HttpClient
def removeHeader(key: String): HttpClient

Attributes

Inherited from:
HttpClient
def restful[Request : RW, Response : RW](request: Request): IO[Response]

Attributes

Inherited from:
HttpClient
def restfulEither[Request : RW, Success : RW, Failure : RW](request: Request): IO[Either[Failure, Success]]

Similar to the restful call, but provides a different return-type if the response is an error.

Similar to the restful call, but provides a different return-type if the response is an error.

Type parameters

Failure

the failure (non-OK response) response type

Request

the request type

Success

the success (OK response) response type

Value parameters

request

the request object to convert to JSON and send

Attributes

Returns

either Failure or Success

Inherited from:
HttpClient
def restfulTry[Request : RW, Response : RW](request: Request): IO[Try[Response]]

Builds on the send method by supporting basic restful calls that take a case class as the request and returns a case class as the response.

Builds on the send method by supporting basic restful calls that take a case class as the request and returns a case class as the response.

Type parameters

Request

the request type

Response

the response type

Value parameters

request

the request object to convert to JSON and send

Attributes

Returns

Future[Response]

Inherited from:
HttpClient

Attributes

Inherited from:
HttpClient
def saveDirectory(saveDirectory: String): HttpClient

Attributes

Inherited from:
HttpClient
final def send(): IO[HttpResponse]

Attributes

Inherited from:
HttpClient
final def sendTry(): IO[Try[HttpResponse]]

Sends an HttpRequest and receives an asynchronous HttpResponse future.

Sends an HttpRequest and receives an asynchronous HttpResponse future.

Attributes

Returns

Future[HttpResponse]

Inherited from:
HttpClient
def session(session: Session): HttpClient

Attributes

Inherited from:
HttpClient
def sessionManager(sessionManager: SessionManager): HttpClient

Attributes

Inherited from:
HttpClient
def timeout(timeout: FiniteDuration): HttpClient

Attributes

Inherited from:
HttpClient
def url(url: URL): HttpClient

Attributes

Inherited from:
HttpClient
def url: URL

Attributes

Inherited from:
HttpClient
def webSocket(): WebSocket

Attributes

Inherited from:
HttpClient