Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
RadySonabu opened this issue Sep 13, 2021 · 6 comments

Comments

@RadySonabu
Copy link

No description provided.

@yezyilomo
Copy link
Owner

yezyilomo commented Sep 13, 2021

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.

@RadySonabu RadySonabu changed the title When I deploy django-restql on lambda, ?query={} results into HTTP 400 error. When I deploy django-restql on AWS lambda, "?query={}" results into HTTP 400 error. Sep 16, 2021
@RadySonabu
Copy link
Author

RadySonabu commented Sep 16, 2021

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.

@yezyilomo
Copy link
Owner

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

@RadySonabu
Copy link
Author

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.

@yezyilomo
Copy link
Owner

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.

@RadySonabu
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants