IsmailJallouli
IsmailJallouli

Reputation: 715

NelmioApiDoc Bad Request 400 with RestApi

The Nelmio is working perfectly in my project but I get an error 400 Bad Request

when I want to insert a date in my Nelmio !!400 Bad Request here

The type used is Date.

Upvotes: 1

Views: 256

Answers (2)

Amine Jallouli
Amine Jallouli

Reputation: 3949

I guess that all the transaction details are not needed as parameters which have to be defined in the URL of you request.

In case of being data, you will have to specify it like this {"transaction":{}} in the content box on you right.

Upvotes: 0

Alexey B.
Alexey B.

Reputation: 12033

you send something like

transaction[dateP]=value

but form required something like this

transaction[dateP][year]=value&transaction[dateP][month]=value&transaction[dateP][data]=value

So split your value into 3 parameters or you can change widget option of dateP field to single_text to solve the problem.

Upvotes: 1

Related Questions