diegohaz/rest

Problem with form-data

antojsh opened this issue · 4 comments

Parameters are not recognized when submitted by form-data

{ "name": "required", "param": "name", "required": true, "valid": false, "message": "name is required" }

It's pretty self-explanatory, some parameters are required, and here it's the name. I guess you are not specifying the name when posting your data.

api
I'm using postman, and if I'm sending each of the parameters, I'm even sending a file

I remember that i had the same problem with postman at some point. I solved it by testing with a python script :
import requests data = {"name":"test", "mode":"full-screen" } response = requests.post('http://IP:PORT/endpoint', data=data)

Hi @antojsh! You should use x-www-form-urlencoded.