public class HttpRequest$
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static HttpRequest$ |
MODULE$
Static reference to the singleton instance of this Scala object.
|
Constructor and Description |
---|
HttpRequest$() |
Modifier and Type | Method and Description |
---|---|
HttpRequest |
apply(HttpMethod method,
Uri uri,
scala.collection.immutable.Seq<HttpHeader> headers,
RequestEntity entity,
HttpProtocol protocol) |
Uri |
effectiveUri(Uri uri,
scala.collection.immutable.Seq<HttpHeader> headers,
boolean securedConnection,
Host defaultHostHeader)
Determines the effective request URI according to the logic defined at
http://tools.ietf.org/html/rfc7230#section-5.5
Throws an
IllegalUriException if the URI is relative and the headers don't
include a valid pekko.http.scaladsl.model.headers.Host header or if URI authority and pekko.http.scaladsl.model.headers.Host header don't match. |
OptHttpRequest |
unapply(HttpRequest any) |
void |
verifyUri(Uri uri)
Verifies that the given
Uri is non-empty and has either scheme http , https , ws , wss or no scheme at all. |
public static final HttpRequest$ MODULE$
public Uri effectiveUri(Uri uri, scala.collection.immutable.Seq<HttpHeader> headers, boolean securedConnection, Host defaultHostHeader)
Throws an IllegalUriException
if the URI is relative and the headers
don't
include a valid pekko.http.scaladsl.model.headers.Host
header or if URI authority and pekko.http.scaladsl.model.headers.Host
header don't match.
uri
- (undocumented)headers
- (undocumented)securedConnection
- (undocumented)defaultHostHeader
- (undocumented)public void verifyUri(Uri uri)
Uri
is non-empty and has either scheme http
, https
, ws
, wss
or no scheme at all.
If any of these conditions is not met the method throws an IllegalUriException
.uri
- (undocumented)public HttpRequest apply(HttpMethod method, Uri uri, scala.collection.immutable.Seq<HttpHeader> headers, RequestEntity entity, HttpProtocol protocol)
public OptHttpRequest unapply(HttpRequest any)