|
When using the Importer REST API to import data, some strange behaviour occurs when using the wrong content-type.
If I POST an empty object:
to .../gepserver/rest/imports with the (valid) content type application/json I get back an HTTP 500 error. If I change the content type to anything other than application/json (eg. application/json; charset=UTF-8, foobar, etc.) I get back an HTTP 201 Created. The response contains a new ID, is in the state PENDING, and has zero tasks in the tasks array.
Furthermore, when formulating a valid request and using content-type application/json; charset=UTF-8, it produces the same response as with an invalid request – newly generated ID, pending status, and no tasks.
When making a valid request using the content-type applicaition-json, the api behaves as expected.
|