ePages 7.19.0 - DE_EPAGES/SageOne/API/Webservice/RestService.pm

Package DE_EPAGES::SageOne::API::Webservice::RestService

Generic REST Service for requesting to epagesj

Functions

decodeResponse
new
sendDeleteRequest
sendGetRequest
sendPutRequest

decodeResponse

Decode response content §throws JsonParserError

Syntax
decodeResponse($Response);
Input
$Response (HTTP::Response)
response from request
Return
$DecodedContent (any)
decoded content

new

creates a new object of RestService

Syntax
new();
Input
$EpagesObject (DE_EPAGES::Object::API::Object:Object)
any epages object
Return
$self (DE_EPAGES::SageOne::API::Webservice::RestService)
self

sendDeleteRequest

does the delete request to epagesj §throws JsonParserError, WebserviceError

Syntax
sendDeleteRequest($Url, $hHeaders);
Input
$Url (string)
epagesj endpoint URL
$hHeaders (ref_hash)
header data
Return
(HTTP::Response)
response as object

sendGetRequest

does the get request to epagesj §throws WebserviceError

Syntax
sendGetRequest($Url, $hHeaders);
Input
$Url (string)
epagesj endpoint URL
$hHeaders (ref_hash)
header data
Return
(HTTP::Response)
response as hash

sendPutRequest

does the put request to epagesj §throws JsonParserError, WebserviceError

Syntax
sendPutRequest($Url, $hHeaders, $hContent);
Input
$Url (string)
epagesj endpoint URL
$hHeaders (ref_hash)
header data
$hContent (ref_hash or arrayref)
content data
Return
(HTTP::Response)
response as object