ixudra / curl

Custom PHP curl library for the Laravel 5 framework - developed by Ixudra

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Who send a token to header using jwt?

mzcoder-hub opened this issue · comments

This librart can send jwt token? Like
Authorization bearer <token>

How can i implementation that method ? That title should be how not who sorry

Authorization is just a header, so you can just add it using the withHeader() method:

    use Ixudra\Curl\Facades\Curl;

    $response = Curl::to('http://foo.com/bar')
        ->withHeader('Authorization: Bearer '. $token)
        ->get();