Overview

Namespaces

  • PipelinerSales
    • ApiClient
      • Http
      • Query
      • Repository
        • Rest

Classes

  • CreatedResponse
  • CurlHttpClient
  • Response

Interfaces

  • HttpInterface

Exceptions

  • PipelinerHttpException
  • Overview
  • Namespace
  • Class
  • Tree

Class CurlHttpClient

Implementation of HttpInterface using cURL to issue the requests.

PipelinerSales\ApiClient\Http\CurlHttpClient implements PipelinerSales\ApiClient\Http\HttpInterface
Namespace: PipelinerSales\ApiClient\Http
Located at PipelinerSales/ApiClient/Http/CurlHttpClient.php
Methods summary
public
# __construct( $userAgent = 'Pipeliner_PHP_API_Client/1.0' )
public PipelinerSales\ApiClient\Http\Response
# request( string $method, string $url, string $rawPayload = null, string $contentType = 'application/json' )

Sends a HTTP request

Sends a HTTP request

Parameters

$method
HTTP method
$url
The URL
$rawPayload

Body of the request in case of POST/PUT requests. Must already be encoded in the form expected by the server. Pipeliner's server expects JSON.

$contentType
If $rawPayload is not null, specifies the content of the Content-Type header.

Returns

PipelinerSales\ApiClient\Http\Response

Throws

PipelinerSales\ApiClient\Http\PipelinerHttpException

Implementation of

PipelinerSales\ApiClient\Http\HttpInterface::request()
public
# setUserCredentials( string $username, string $password )

Sets the user credentials used for authentication

Sets the user credentials used for authentication

Parameters

$username
$password

Implementation of

PipelinerSales\ApiClient\Http\HttpInterface::setUserCredentials()
public
# setUserAgent( string $userAgent )

Sets the user agent header used in HTTP requests

Sets the user agent header used in HTTP requests

Parameters

$userAgent
public
# setExtraCurlOptions( array $extraOptions )

Sets extra options that will be passed to curl for every request.

Sets extra options that will be passed to curl for every request.

Parameters

$extraOptions
an array in the format expected by curl_setopt_array
API documentation generated by ApiGen