You are here

public function Lockr::post in Lockr 7

Same name and namespace in other branches
  1. 7.2 vendor/lockr/lockr-client/src/Lockr.php \Lockr\Lockr::post()

File

src/Lockr/Lockr.php, line 86

Class

Lockr
Primary interface for Lockr API calls.

Namespace

Lockr

Code

public function post($uri, $data, $auth = null) {
  $uri = $this->partner
    ->getWriteUri() . $uri;
  $options = $this->partner
    ->requestOptions();
  $options['data'] = $data;
  if (null !== $auth) {
    $options['auth'] = $auth;
  }
  return $this
    ->request('POST', $uri, $options);
}