Internal server error when deploying a form

Hello,
I am trying to upload a JSON Form using the REST Form API as follows:

curl -X POST -H "Content-Type: application/json" -H "Accept: application/json" --user kermit:kermit -d @form.form http://hostname:8080/flowable-rest/form-api/form-repository/deployments

The above command fails with the following message:

{"message":"Internal server error","exception":"Content type 'application/json' not supported"}

I also tried the following command:
curl -X POST -H "Content-Type: application/json" -H "Accept: application/json" --user kermit:kermit -d'name=FirstForm.form' -d @form.form http://hostname:8080/flowable-rest/form-api/form-repository/deployments

It results in the same response from the server.

I built the curl command following the Flowable Form guide at:
http://www.flowable.org/docs/userguide-form/index.html#_create_a_new_deployment

Is there a mistake with my request?

Hi.

The content-type needs to be ‘multipart/form-data’.
(As stated in the docs link)

The request body should contain data of type multipart/form-data. There should be exactly one file in the request, any additional files will be ignored. The deployment name is the name of the file-field passed in.

Hope this helps.

Regards,

Yvo

Hello Yvo,
Thank you. Your suggestion fixed the issue.