Curl PUT Request With JWT Authorization Header

231 views
Skip to first unread message

Peter Boyles

unread,
Aug 23, 2016, 8:32:31 AM8/23/16
to Django users

I am still getting a hang of using curl for testing API request from the terminal. I have a particular issue with formatting because the API request I am attempting requires a JWT Token to be passed with every call. The request I am attempting to pass is PUT request and my question is where to place the header for the JWT token authorization. I have tried the following format and I get a error Could not resolve host: —H curl: (6) Could not resolve host: Authorization:


curl -X PUT -H "Authorization: JWT <token here>" -d "field=value" "https://url/update_record/<id>/"
 

Any ideas?

Ricardo Daniel Quiroga

unread,
Aug 23, 2016, 5:10:34 PM8/23/16
to django...@googlegroups.com
I using Postman, is a plugin of chrome for test xhr petitions

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/676040dc-a7fc-4ca8-96ce-8fd09559ab87%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

Ricardo Daniel Quiroga

Reply all
Reply to author
Forward
0 new messages