Ruby Roda Web Application Framework Post Request Params
- Last modified atThere is difference when accessing the parameters data in Roda aplication between sending request with Content-Type: application/x-www-form-urlencoded
and Content-Type: application/json
.
When Sending POST Request with Content-Type: x-www-form-urlencoded
Use r.params['your_params']
to read your_params
parameter value.
Example Request
Example Roda Route
When Sending POST Request with Content-Type: application/json
Use r.body.read
to read the JSON body parameter and parse it with JSON parser.
Example Request
Example Roda Route
Sponsored Links
- Register to Digital Ocean cloud with this link and get $200 credit
- Looking for cheap CDN? Bunny is the answer
- Alternative Cloud besides AWS and Digital Ocean