Ogeon/rustful

Lacking documentation on how to handle POST requests

Closed this issue · 3 comments

Hello! This is the cleanest REST framework I've seen so far, but I'm having trouble getting requests other than GET to work. Can you clarify at all? Perhaps add more documentation surrounding these? Thank you!

Ogeon commented

This is the cleanest REST framework I've seen so far

Thank you 😄

Can you clarify at all? Perhaps add more documentation surrounding these?

Yes, of course! Would you like to expand a bit on what you find confusing or hard to grasp? Is it general information about how to use something else than GET? I saw the other issue about body parsing, but is there anything in particular, besides that, you would like to see in the documentation? Any information about what you have tried so far and what you have looked at would help.

Thank you for notifying me about this.

I was able to set up a reponse and routing to POST requests easily by changing the method, but I was strugging to get form data out of the post. Can you clarify which variables you would use to do that?

Ogeon commented

I have added examples for that in #43, but you can access it through context.body, using one of its reader methods. You can also check out the POST example. I'm currently writing about how to access other request and contextual data.