Home>

Send data on the API using the GUZZLE library. The API works on Bearer Token, but when I try to add a header with a token (or any other), then when sending the query of these headlines is not.

Here is my code:

$ client= new client ();
$ Request= $ client->
Request ('Post', Self :: $ Baseuri, [
    'Headers'= >
 [
        'Authorization'= >
 'Bearer'. Bearer_Token,
        'Accept'= >
 'Application /Json',
    ],
    'Body'= >
 JSON_ENCODE ($ FormData)
]);

It is all right. Are you sure that these headlines are not? Turn on debug

dinario2021-07-15 11:27:08

I completed my answer, please look

KekJS2021-07-15 11:27:08

We must see for you, is there an authorization headline in this text? Are you serious now?

Ипатьев2021-07-15 11:27:08

They are not, and I do not know why. I only posted a response that Debaager issues

KekJS2021-07-15 11:27:08