You are here

public function Lockr::post in Lockr 7.2

Same name and namespace in other branches
  1. 7 src/Lockr/Lockr.php \Lockr\Lockr::post()

File

vendor/lockr/lockr-client/src/Lockr.php, line 90

Class

Lockr
Primary interface for Lockr API calls.

Namespace

Lockr

Code

public function post($uri, $data, $auth = null) {

  // horrible hack needed until Lockr v2
  $uri = $this->partner
    ->getAccountingUri() . $uri;
  $options = $this->partner
    ->requestOptions();
  $options['data'] = $data;
  if (null !== $auth) {
    $options['auth'] = $auth;
  }
  return $this
    ->request('POST', $uri, $options);
}