I used that library about 1 month ago. I figured it out just customizing the class HttpPostJson.
You should do something like this:
in Lsw\ApiCallerBundle\Call
public function makeRequest($curl, $options, $authorization)
{
$curl->setopt(CURLOPT_URL, $this->url);
$curl->setopt(CURLOPT_POST, 1);
$curl->setopt(CURLOPT_POSTFIELDS, $this->requestData);
$curl->setopt(CURLOPT_HTTPHEADER, array(
'Authorization: ' . $authorization
));
$curl->setoptArray($options);
$this->responseData = $curl->exec();
}
I just added
$curl->setopt(CURLOPT_HTTPHEADER, array(
'Authorization: ' . $authorization
));
in every API Call that needed an authorization.