Closed sabas1080 closed 8 years ago
I saw the failed requests coming in last night. It looks as if the user is not being logged in correctly.
A valid curl request would look like the following:
$ curl -v -k -X GET -H "Content-Type: application/json" -H 'Authorization: Token 37b13ab6aefe34344dd0d853c9491e8de4caa27c' "https://eggtimer.herokuapp.com/api/v2/statistics/"
* Trying 50.16.215.101...
* Connected to eggtimer.herokuapp.com (50.16.215.101) port 443 (#0)
* TLS 1.2 connection using TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
* Server certificate: *.herokuapp.com
* Server certificate: DigiCert SHA2 High Assurance Server CA
* Server certificate: DigiCert High Assurance EV Root CA
> GET /api/v2/statistics/ HTTP/1.1
> Host: eggtimer.herokuapp.com
> User-Agent: curl/7.43.0
> Accept: */*
> Content-Type: application/json
> Authorization: Token <token>
>
< HTTP/1.1 200 OK
< Connection: keep-alive
< Server: gunicorn/19.3.0
< Date: Sun, 17 Jan 2016 17:24:36 GMT
< Transfer-Encoding: chunked
< Allow: GET, POST, HEAD, OPTIONS
< Vary: Accept, Cookie
< X-Frame-Options: SAMEORIGIN
< Content-Type: application/json
< Via: 1.1 vegur
<
* Connection #0 to host eggtimer.herokuapp.com left intact
{ ... result data ... }
Are you using https?
So far, I haven't been able to duplicate the issue you are seeing. I have tried http and also invalid tokens, and I get 301 and 403 respectively. I will continue investigating.
Thanks, yes i using https with ESP8266.
I get no mistake, even 301 or 400
keep trying,
Indeed, you've found a path on the server that results in a 500. I'll see what I can do to reproduce and fix it.
I can do POST correctly, but does not respond GET
an apology for the inconvenience
I solved the problem , thanks
I'm glad you sorted it out. Would you be willing to write out the solution here, in case anyone else encounters it?
Hi I 'm trying to make a request from Arduino , but can not receive any response from the server,
Could you help me a little to make the request ?
Thanks