HttpClient

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

Attributes

Companion:
class
Graph
Supertypes
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Self type

Members list

Concise view

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 : Writer]: 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.

Attributes

Response

the response type

Returns:

Response

Inherited from:
HttpClient
def callTry[Response : Writer]: 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.

Attributes

Response

the response type

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.

Attributes

content

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

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.

Attributes

content

the content to set

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): 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

Attributes

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

Convenience method to sending JSON content.

Convenience method to sending JSON content.

Attributes

json

the JSON content to send

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 : Reader, Response : Writer](request: Request): IO[Response]

Attributes

Inherited from:
HttpClient
def restfulEither[Request : Reader, Success : Writer, Failure : Writer](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.

Attributes

Failure

the failure (non-OK response) response type

Request

the request type

Success

the success (OK response) response type

request

the request object to convert to JSON and send

Returns:

either Failure or Success

Inherited from:
HttpClient
def restfulTry[Request : Reader, Response : Writer](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.

Attributes

Request

the request type

Response

the response type

request

the request object to convert to JSON and send

Returns:

Future[Response]

Inherited from:
HttpClient
def retries(retries: Int): HttpClient

Attributes

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

Attributes

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

Attributes

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

Attributes

Inherited from:
HttpClient
final def sendTry(retries: Int): 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

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