postForLocation

open fun postForLocation(url: String, request: Any, urlVariables: Array<Any>): URI

Create a new resource by POSTing the given object to the URI template, and returns the value of the Location header. This header typically indicates where the new resource is stored.

URI Template variables are expanded using the given URI variables, if any.

The request parameter can be a HttpEntity in order to add additional HTTP headers to the request.

Return

the value for the Location header

Parameters

url

the URL

request

the Object to be POSTed, may be null

urlVariables

the variables to expand the template

See also


open fun postForLocation(url: String, request: Any, urlVariables: Map<String, out Any>): URI

Create a new resource by POSTing the given object to the URI template, and returns the value of the Location header. This header typically indicates where the new resource is stored.

URI Template variables are expanded using the given map.

The request parameter can be a HttpEntity in order to add additional HTTP headers to the request.

Return

the value for the Location header

Parameters

url

the URL

request

the Object to be POSTed, may be null

urlVariables

the variables to expand the template

See also


open fun postForLocation(url: URI, request: Any): URI

Create a new resource by POSTing the given object to the URL, and returns the value of the Location header. This header typically indicates where the new resource is stored.

The request parameter can be a HttpEntity in order to add additional HTTP headers to the request.

Return

the value for the Location header

Parameters

url

the URL

request

the Object to be POSTed, may be null

See also