original_string: protected function request($data) {
      try {
        if ($this->method == 'delete') {
          $response = $this->client->{$this->method}($this->path(), [], $data);
        }
        else {
          $response = $this->client->{$this->method}($this->path(), $data);
        }
        $this->client->close();
      }
      catch (\Exception $e) {
        // Throw an expection if something goes wrong.
        $this->triggerError($e->getMessage());
      }
      return $this->response($response);
    }
code: protected function request($data) {
      try {
        if ($this->method == 'delete') {
          $response = $this->client->{$this->method}($this->path(), [], $data);
        }
        else {
          $response = $this->client->{$this->method}($this->path(), $data);
        }
        $this->client->close();
      }
      catch (\Exception $e) {
        // Throw an expection if something goes wrong.
        $this->triggerError($e->getMessage());
      }
      return $this->response($response);
    }
code_tokens: protected function request ( $ data ) { try { if ( $ this -> method == 'delete' ) { $ response = $ this -> client -> { $ this -> method } ( $ this -> path ( ) , [ ] , $ data ) ; } else { $ response = $ this -> client -> { $ this -> method } ( $ this -> path ( ) , $ data ) ; } $ this -> client -> close ( ) ; } catch ( \ Exception $ e ) { // Throw an expection if something goes wrong. $ this -> triggerError ( $ e -> getMessage ( ) ) ; } return $ this -> response ( $ response ) ; }
docstring: Create HTTP request.
  
  @param (array|string) $data Raw content of the request or associative array to pass to endpoints.
  
  @return (object) HTTP Response object.
docstring_tokens: Create HTTP request .