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?
August 23, 2016 at 5:44 AM
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?
--
You received this message because you are subscribed to the Google Groups "Django REST framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-rest-fram...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
HTTP/1.1 500 INTERNAL SERVER ERROR
Connection: keep-alive
Content-Type: text/html
Date: Tue, 23 Aug 2016 13:15:20 GMT
Server: gunicorn/19.6.0
Transfer-Encoding: chunked
Vary: Cookie
Via: 1.1 vegur
X-Frame-Options: SAMEORIGIN
http: error: ChunkedEncodingError: ('Connection broken: IncompleteRead(2785 bytes read, 7455 more expected)', IncompleteRead(2785 bytes read, 7455 more expected))
Enter code here...
To unsubscribe from this group and stop receiving emails from it, send an email to django-rest-framework+unsub...@googlegroups.com.