NetworkRequest

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

Represents an HTTP request.

Parameters

url

The URL to fetch.

method

The HTTP method.

headers

The HTTP headers.

body

The HTTP request body.

extras

Extras to support extension.

Constructors

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

Properties

Link copied to clipboard
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, extras: Extras = this.extras): NetworkRequest