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

Backend payload with hunchentoot #13

Open
JensNevens opened this issue Oct 3, 2018 · 3 comments
Open

Backend payload with hunchentoot #13

JensNevens opened this issue Oct 3, 2018 · 3 comments

Comments

@JensNevens
Copy link

For me, the function payload-as-string was not functioning properly, using Huchentoot as a backend. The curl request I send looks like this:

curl -H "Content-Type: application/json" -d '{"foo": "bar"}' http://localhost:9003/clevr-api/comprehend

The method backend-payload, which is called by payload-as-string, would read the raw post data from Hunchentoot as a byte array. I implemented a quick fix by replacing (funcall (read-from-string "hunchentoot:raw-post-data")) by (apply (read-from-string "hunchentoot:raw-post-data") '(:force-text t)). This is maybe not the best solution, but it works for my purposes.

@joaotavora
Copy link
Owner

Thanks for reporting this. Maybe an encoding error. I'll have a look.

@JensNevens
Copy link
Author

Any news on this issue?

PS: I am using macOS 10.13 and LispWorks 7.1. Maybe this helps to solve the issue.

@davd33
Copy link
Contributor

davd33 commented Mar 29, 2020

#20 I had the same issue, solved by the fixed proposed by @JensNevens, and so I'm submitting a PR to fix this here too.

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

3 participants