51Degrees Pipeline for PHP

fiftyone\pipeline\cloudrequestengine\HttpClient Class Reference

Public Member Functions

 makeCloudRequest (string $type, string $url, ?string $content, ?string $originHeader)
 Internal helper method to make a cloud request uses CURL if available, falls back to file_get_contents.
 parseHeaders (array $headers)
 Parser function to get formatted headers.

Member Function Documentation

◆ makeCloudRequest()

fiftyone\pipeline\cloudrequestengine\HttpClient::makeCloudRequest ( string $type,
string $url,
?string $content,
?string $originHeader )

Internal helper method to make a cloud request uses CURL if available, falls back to file_get_contents.

Parameters
string$typeMethod use to send HTTP request
string$url
null | string$contentData to be sent in the post body
null | string$originHeaderThe value to use for the Origin header
Returns
string Associative array with data and error properties error contains any errors from the request, data contains the response

◆ parseHeaders()

fiftyone\pipeline\cloudrequestengine\HttpClient::parseHeaders ( array $headers)

Parser function to get formatted headers.

Parameters
array<string>$headers
Returns
array<string, string>