NetworkRequest

class NetworkRequest(val url: String, val method: String = HTTP_METHOD_GET, val headers: NetworkHeaders = NetworkHeaders.EMPTY, val body: NetworkRequestBody? = null)

Represents an HTTP request.

Parameters

url

The URL to fetch.

method

The HTTP method.

headers

The HTTP headers.

body

The HTTP request body.

Constructors

Link copied to clipboard
constructor(url: String, method: String = HTTP_METHOD_GET, headers: NetworkHeaders = NetworkHeaders.EMPTY, body: NetworkRequestBody? = null)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val url: String

Functions

Link copied to clipboard
fun copy(url: String = this.url, method: String = this.method, headers: NetworkHeaders = this.headers, body: NetworkRequestBody? = this.body): NetworkRequest