JSON-API-Client icon indicating copy to clipboard operation
JSON-API-Client copied to clipboard

Allow custom headers in request

Open clicktrend opened this issue 5 years ago • 0 comments

I need to add custom headers like "X-Include". I have extended code after this line https://github.com/eosnewmedia/JSON-API-Client/blob/5769305158d7f4d50bb40213759b914b843d095b/src/JsonApiClient.php#L139

foreach($request->headers()->all() as $header => $value) {
    $httpRequest = $httpRequest->withHeader($header, $value);
}

clicktrend avatar Mar 17 '20 08:03 clicktrend