Consume API with bearer
I'm trying to consume an API
3 Replies
and this is the dumping request
Illuminate\Http\Client\Request {#2263 ▼ // vendor/laravel/framework/src/Illuminate/Http/Client/PendingRequest.php:1204
#request: GuzzleHttp\Psr7\Request {#2251 ▼
-method: "GET"
-requestTarget: null
-uri: GuzzleHttp\Psr7\Uri {#2244 ▼
-scheme: "https"
-userInfo: ""
-host: "test.imprese.openapi.it"
-port: null
-path: "/base/12485671007"
-query: ""
-fragment: ""
-composedComponents: null
}
-headers: array:3 [▼
"User-Agent" => array:1 [▶]
"Host" => array:1 [▶]
"Authorization" => array:1 [▼
0 => "Bearer 655a5292d2055031490d831c"
]
]
-headerNames: array:3 [▼
"user-agent" => "User-Agent"
"host" => "Host"
"authorization" => "Authorization"
]
-protocol: "1.1"
-stream: GuzzleHttp\Psr7\Stream {#2250 ▼
-stream: stream resource @39 ▶}
-size: 0
-seekable: true
-readable: true
-writable: true
-uri: "php://temp"
-customMetadata: []
}
}
#data: []
}
Illuminate\Http\Client\Request {#2263 ▼ // vendor/laravel/framework/src/Illuminate/Http/Client/PendingRequest.php:1204
#request: GuzzleHttp\Psr7\Request {#2251 ▼
-method: "GET"
-requestTarget: null
-uri: GuzzleHttp\Psr7\Uri {#2244 ▼
-scheme: "https"
-userInfo: ""
-host: "test.imprese.openapi.it"
-port: null
-path: "/base/12485671007"
-query: ""
-fragment: ""
-composedComponents: null
}
-headers: array:3 [▼
"User-Agent" => array:1 [▶]
"Host" => array:1 [▶]
"Authorization" => array:1 [▼
0 => "Bearer 655a5292d2055031490d831c"
]
]
-headerNames: array:3 [▼
"user-agent" => "User-Agent"
"host" => "Host"
"authorization" => "Authorization"
]
-protocol: "1.1"
-stream: GuzzleHttp\Psr7\Stream {#2250 ▼
-stream: stream resource @39 ▶}
-size: 0
-seekable: true
-readable: true
-writable: true
-uri: "php://temp"
-customMetadata: []
}
}
#data: []
}
Solution
FYI
Solved with this