\DevOwl\RealProductManagerWpClient\clientClientUtils

Handle Real Product Manager API calls (Utilities).

Summary

Methods
Properties
Constants
parseResponse()
request()
No public properties found
ERROR_CODE_REMOTE
ERROR_CODE_CLIENT_PARSE
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Constants

ERROR_CODE_REMOTE

ERROR_CODE_REMOTE ='rpm_wpc_remote'

ERROR_CODE_CLIENT_PARSE

ERROR_CODE_CLIENT_PARSE ='rpm_wpc_client_parse'

Methods

parseResponse()

parseResponse(\WP_Error|array  $response): \WP_Error|array

Parse response as JSON or return `WP_Error` on failures.

Parameters

\WP_Error|array $response

Returns

\WP_Error|array

request()

request(\DevOwl\RealProductManagerWpClient\AbstractInitiator  $initiator,string  $endpoint,array  $body = null,string  $method = 'GET')

`POST` (or `PUT`, `GET`, .

..) data to the remote host.

Parameters

\DevOwl\RealProductManagerWpClient\AbstractInitiator $initiator
string $endpoint
array $body
string $method