I'm trying to execute `POST /task/create` Rest API method (https://docs.camunda.org/manual/7.3/api-references/rest/#task-create-task), but it doesn't work.
The error message is "HTTP/1.1 405 Method Not Allowed" and it seems like that POST method isn't allowed.
Could you please tell me how to avoid this problem?
My environment is as bellow:
- camunda BPM platform version: 7.3.0
- Apache Tomcat Server version: 7.0.62
The command and response I'm trying is as bellow:
$ curl 'http://localhost:8080/engine-rest/task/create' \
> --request POST \
> --data 'name=MyTask' \
> --data 'description=Thishavetobedoneveryurgent' \
> --data 'assignee=demo' \
> --data 'owner=demo' \
> --verbose
* Trying ::1...
* Connected to localhost (::1) port 8080 (#0)
> POST /engine-rest/task/create HTTP/1.1
> Host: localhost:8080
> User-Agent: curl/7.43.0
> Accept: */*
> Content-Length: 75
> Content-Type: application/x-www-form-urlencoded
>
* upload completely sent off: 75 out of 75 bytes
< HTTP/1.1 405 Method Not Allowed
< Server: Apache-Coyote/1.1
< Allow: HEAD, GET, OPTIONS, PUT
< Content-Length: 0
< Date: Sun, 07 Feb 2016 09:44:28 GMT
<
* Connection #0 to host localhost left intact
(For environmental issue check,) the following works:
$ curl 'http://localhost:8080/engine-rest/task/count' \
> --verbose
* Trying ::1...
* Connected to localhost (::1) port 8080 (#0)
> GET /engine-rest/task/count HTTP/1.1
> Host: localhost:8080
> User-Agent: curl/7.43.0
> Accept: */*
>
< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Cache-Control: no-cache
< Content-Type: application/json
< Transfer-Encoding: chunked
< Date: Sun, 07 Feb 2016 09:40:50 GMT
<
* Connection #0 to host localhost left intact
{"count":15}
$ curl http://localhost:8080/engine-rest/task/create -H "Content-Type: application/json" -d '{"name": "MyTask", "description": "Thishavetobedoneveryurgent", "assignee": "demo"}' -v* Trying ::1...* Connected to localhost (::1) port 8080 (#0)> POST /engine-rest/task/create HTTP/1.1> Host: localhost:8080> User-Agent: curl/7.47.0> Accept: */*> Content-Type: application/json> Content-Length: 83> * upload completely sent off: 83 out of 83 bytes< HTTP/1.1 204 No Content< Server: Apache-Coyote/1.1< Date: Mon, 08 Feb 2016 08:42:17 GMT< * Connection #0 to host localhost left intact