HttpRequest

data class HttpRequest(val method: HttpMethod = GET, val protocol: HttpProtocol = HTTP, val host: String = "localhost", val port: Int = 80, val path: String = "", val queryParameters: QueryParameters = QueryParameters(), val headers: Headers = Headers(), val body: Any = "", val parts: List<HttpPart> = emptyList(), val formParameters: FormParameters = FormParameters(), val cookies: List<Cookie> = emptyList(), val contentType: ContentType? = null, val certificateChain: List<X509Certificate> = emptyList(), val accept: List<ContentType> = emptyList(), val contentLength: Long = -1L, val authorization: Authorization? = null) : HttpRequestPort

Constructors

Link copied to clipboard
constructor(method: HttpMethod = GET, protocol: HttpProtocol = HTTP, host: String = "localhost", port: Int = 80, path: String = "", queryParameters: QueryParameters = QueryParameters(), headers: Headers = Headers(), body: Any = "", parts: List<HttpPart> = emptyList(), formParameters: FormParameters = FormParameters(), cookies: List<Cookie> = emptyList(), contentType: ContentType? = null, certificateChain: List<X509Certificate> = emptyList(), accept: List<ContentType> = emptyList(), contentLength: Long = -1L, authorization: Authorization? = null)

Properties

Link copied to clipboard
open override val accept: List<ContentType>
Link copied to clipboard
open override val authorization: Authorization? = null
Link copied to clipboard
open override val body: Any
Link copied to clipboard
open override val certificateChain: List<X509Certificate>
Link copied to clipboard
open override val contentLength: Long
Link copied to clipboard
open override val contentType: ContentType? = null
Link copied to clipboard
open override val cookies: List<Cookie>
Link copied to clipboard
open override val formParameters: FormParameters
Link copied to clipboard
open override val headers: Headers
Link copied to clipboard
open override val host: String
Link copied to clipboard
open override val method: HttpMethod
Link copied to clipboard
open override val parts: List<HttpPart>
Link copied to clipboard
open override val path: String
Link copied to clipboard
open override val port: Int = 80
Link copied to clipboard
open override val protocol: HttpProtocol
Link copied to clipboard
open override val queryParameters: QueryParameters

Functions

Link copied to clipboard
Link copied to clipboard
open fun bodyString(): String
Link copied to clipboard
open fun certificate(): X509Certificate?
Link copied to clipboard
open fun cookiesMap(): Map<String, Cookie>
Link copied to clipboard
open fun origin(): String?
Link copied to clipboard
open fun partsMap(): Map<String, HttpPart>
Link copied to clipboard
open operator fun plus(cookie: Cookie): HttpRequestPort
open operator fun plus(formParameter: FormParameter): HttpRequestPort
open operator fun plus(formParameters: FormParameters): HttpRequestPort
open operator fun plus(header: Header): HttpRequestPort
open operator fun plus(headers: Headers): HttpRequestPort
open operator fun plus(part: HttpPart): HttpRequestPort
open operator fun plus(queryParameter: QueryParameter): HttpRequestPort
open operator fun plus(queryParameters: QueryParameters): HttpRequestPort
open operator fun plus(parts: List<HttpPart>): HttpRequestPort
Link copied to clipboard
open fun referer(): String?
Link copied to clipboard
open fun url(): URL
Link copied to clipboard
open fun userAgent(): String?
Link copied to clipboard
open override fun with(body: Any, headers: Headers, contentType: ContentType?, method: HttpMethod, protocol: HttpProtocol, host: String, port: Int, path: String, queryParameters: QueryParameters, parts: List<HttpPart>, formParameters: FormParameters, cookies: List<Cookie>, accept: List<ContentType>, authorization: Authorization?, certificateChain: List<X509Certificate>): HttpRequestPort