Hi Andrew, I tried that call and got this strange message:
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... On Monday, August 22, 2016 at 10:26:20 PM UTC-5, Andrew Backer wrote: > > Try using the `httpie` utility, you'll find it _much_ less of a pain in > the ass than `curl`. Gave up on that ages ago. > > ``` > pip install httpie > export TOKEN=`get token value` > http put url.com/route/ field=value Authorization:"JWT $TOKEN" > ``` > > As for the Curl line, it looks fine to me, i don't see anything obviously > wrong. is the "-" in "-H" the right dash? > > bit.io.c...@gmail.com <javascript:> > 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-framework+unsubscr...@googlegroups.com <javascript:>. > For more options, visit https://groups.google.com/d/optout. > > > -- 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-framework+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.