In a very brief way I need to send a jwt token in the http header of the requests, how can I change the headers of the jQuery requests $.post()
and $.get()
?
Example of how I do it using curl from the prompt:
curl -H "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJhcHAudGVjbWFuLmNvbSIsInVzZXJuYW1lIjoiSmVhbiBGcmVpdGFzIiwiZW1haWwiOiJoZW5yaXF1ZWszQGxpdmUuY29tIiwiYWNsIjpbInJoIiwiZmluYW5jZWlybyIsImNvbWVyY2lhbCIsImVuZ2VuaGFyaWEiLCJhZG1pbmlzdHJhdGl2byJdfQ==.kq4nJJYBTbjWwtbmu\/wB+EXilDHHPr8es6mXpsXEVMs=" http://meuapp.com/jwt