RequestBuilder

uk.gov.hmrc.http.client.RequestBuilder

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes

Members list

Value members

Abstract methods

def execute[A : HttpReads](implicit evidence$1: HttpReads[A], ec: ExecutionContext): Future[A]
def setHeader(header: (String, String)*): RequestBuilder

Adds the header. If the header has already been defined (e.g. from HeaderCarrier), it will be replaced. It does not affect headers not mentioned.

Adds the header. If the header has already been defined (e.g. from HeaderCarrier), it will be replaced. It does not affect headers not mentioned.

Use transform(_.addHttpHeaders) to append header values to existing.

Attributes

def stream[A : StreamHttpReads](implicit evidence$1: StreamHttpReads[A], ec: ExecutionContext): Future[A]
def transform(transform: WSRequest => WSRequest): RequestBuilder
def withBody[B : Tag](body: B)(implicit evidence$1: BodyWritable[B], evidence$2: Tag[B], ec: ExecutionContext): RequestBuilder

withBody should be called rather than transform(_.withBody). Failure to do so will lead to a runtime exception

withBody should be called rather than transform(_.withBody). Failure to do so will lead to a runtime exception

Attributes