mailerlite-api-v2-php-sdk icon indicating copy to clipboard operation
mailerlite-api-v2-php-sdk copied to clipboard

Access the rate limit headers

Open electronick86 opened this issue 3 years ago • 1 comments

Hello,

It seems that the headers about the rate limit of the api are not accessible when doing a call like

$response =  $mailerliteClient->groups()->addSubscriber(...);

$response contains only the body, but the response_code and the response headers are then no usable by the code. Is there an alternative?

Thanks!!!

electronick86 avatar Feb 07 '22 16:02 electronick86

Had the same issues. Made a fork and added the ability to fetch the response-headers:

https://github.com/sfxon/mailerlite-api-v2-php-sdk

I'll think this over, maybe make a pull request on this, but I am not sure, if this is the most elegant way to handle this. Would be even nicer, to have the response-headers attached to every single result. Please contact me, if you are interested on this. I'll only put effort into this, if it is really required. :)

sfxon avatar Sep 10 '22 09:09 sfxon