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

Ajax-based form request parameters are not detected #11

Open
gbosetti opened this issue Jul 19, 2020 · 1 comment
Open

Ajax-based form request parameters are not detected #11

gbosetti opened this issue Jul 19, 2020 · 1 comment

Comments

@gbosetti
Copy link

Hi. I realized that there is a problem when retrieving the form-based request parameters performed with ajax. More details and my solution here: https://stackoverflow.com/questions/62971100/how-to-pass-a-non-url-request-parameter-to-smalltalk-teapot-from-ajax-call

Well, in fact, I had to extend the request class so I can access the znRequest instance to ask for the entity and its content.
Best,

@zeroflag
Copy link
Owner

Hi, sorry for the late response. The req at: #name is for accessing the key value pairs in a application/x-www-form-urlencoded request (I'm not sure what content-type you used in the ajax request). This is effectively the same as if they were in the query string ?key1=value2&key2=value2 but they're encoded in the request body. If you want to access the raw request you can use the req entity as you did.

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