post

suspend fun OkHttpClient.post(url: String, headers: Headers = DEFAULT_HEADERS, body: RequestBody = DEFAULT_BODY, cache: CacheControl = DEFAULT_CACHE_CONTROL): Response(source)

Send a POST request

Since

extensions-lib 16

Parameters

url

String the url to send the request to

headers

Headers the request headers, defaults to the headers generated by HttpSource.headersBuilder()

body

RequestBody the request body, defaults to the one provided by the app

cache

CacheControl the cache used, defaults to the one provided by the app