vncore / com.venuenext.vncore.http / HttpRequest

HttpRequest

class HttpRequest

HttpRequest VenueNext

Created on 1/23/19. Copyright © 2019 VenueNext Inc. All rights reserved.

Constructors

<init>

HttpRequest VenueNext

HttpRequest(context: Context, url: String, method: HttpMethod, contentType: String?, authProvider: OAuth? = null, body: ByteArray? = null)

Properties

authProvider

val authProvider: OAuth?

body

var body: ByteArray?

connectTimeout

var connectTimeout: Int

contentType

val contentType: String?

context

val context: Context

headers

var headers: MutableMap<String, String>

method

val method: HttpMethod

readTimeout

var readTimeout: Int

url

val url: String

Functions

addHeader

Adds a new request header.

fun addHeader(key: String, value: String?): Unit

requestHeaders

Builds and returns request headers.

fun requestHeaders(): Map<String, String>