NAME

Armadito::Agent::HTTP::Client::ArmaditoAV - HTTP Client for armadito AV RESTful API.

DESCRIPTION

This is the class used by Armadito agent to communicate with armadito antivirus locally.

METHODS

$client->register()

Register to Armadito Antivirus API And set token after parsing AV json response.

$client->sendRequest(%params)

Send a request according to params given. If this is a GET request, params are formatted into URL with _prepareURL method. If this is a POST request, a message must be given in params. This should be a valid JSON message.

The following parameters are allowed, as keys of the %params hash :

url

the url to send the message to (mandatory)

method

the method used: GET or POST. (mandatory)

message

the message to send (mandatory if method is POST)

The return value is a response object. See HTTP::Request and HTTP::Response for a description of the interface provided by these classes.