suggestion: allow user headers pass in to callApiEndpoint()
Closed this issue · 3 comments
admun commented
Currently, a $header is set in this function. There is no way to modified this except hardcode it in code. Maybe there should be a $extra_headers passed into this function and append to $header.
The application for it is for when an API requires custom headers. In my case, YT API requires Content-Type, GData-Version, X-GData-Key set.
admun commented
second thought... maybe this header should pass in from the OAuth2_Service_Configuration constructor??
bashofmann commented
Since passing additional headers to an API call is in most cases more call than provider specific, I added this as a parameter to the callApiEndpoint method.
admun commented
works for me. thx