django-restql icon indicating copy to clipboard operation
django-restql copied to clipboard

When I deploy django-restql on AWS lambda, "?query={}" results into HTTP 400 error.

Open RadySonabu opened this issue 4 years ago • 6 comments
trafficstars

RadySonabu avatar Sep 13 '21 14:09 RadySonabu

HTTP 400 is usually associated with an error message, would be helpful to see one otherwise it would be hard to know what’s really wrong, I’ve never used lambda before but I don’t think if that has anything to do with your error.

yezyilomo avatar Sep 13 '21 15:09 yezyilomo

HTTP 400 is usually associated with an error message, would be helpful to see one otherwise it would be hard to know what’s really wrong, I’ve never used lambda before but I don’t think if that has anything to do with your error.

https://wqaside363.execute-api.us-west-2.amazonaws.com/dev/api/my-user/?query={id} this results to HTTP 400 but while using this on a localhost it works well.

RadySonabu avatar Sep 16 '21 20:09 RadySonabu

The link you sent works just fine to me, it returns only user IDs..

yezyilomo avatar Sep 17 '21 00:09 yezyilomo

If it's a link, it will work but if you copy and paste the link, it won't work.

https://wqaside363.execute-api.us-west-2.amazonaws.com/dev/api/my-user/?query={id,username} if you copy this directly, it won't work.

RadySonabu avatar Sep 21 '21 13:09 RadySonabu

If it's a link, it will work but if you copy and paste the link, it won't work.

https://wqaside363.execute-api.us-west-2.amazonaws.com/dev/api/my-user/?query={id,username} if you copy this directly, it won't work. Below is the error message

The character encoding of the plain text document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the file needs to be declared in the transfer protocol or file needs to use a byte order mark as an encoding signature.

It seems like your server doesn't support encoding of some characters am guessing curly brackets{}, so they need to be encoded before sending the URL to a server.

yezyilomo avatar Sep 21 '21 19:09 yezyilomo

Thanks @yezyilomo. I'll post it here after I fix it on my end.

RadySonabu avatar Sep 22 '21 01:09 RadySonabu