REST API call results in HTTP Error 411

Problem

 When one tries to start an import job using the syntax:

curl -u '<username>:<password>' -X POST 'http://<Datameer-server-IP>:<port-number>/rest/job-execution?configuration=<import-job-configuration-id>'

The call fails with the following error:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd"> 
<HTML><HEAD><TITLE>Length Required</TITLE> 
<META HTTP-EQUIV="Content-Type" Content="text/html; charset=us-ascii"></HEAD> 
<BODY><h2>Length Required</h2> 
<hr><p>HTTP Error 411. The request must be chunked or have a content length.</p> 
</BODY></HTML>

Cause

There are situations where a POST request with an empty message body and without a 'Content-Length' header set is not allowed.

Solution

 Add "-d" argument to the above call so that 'Content-Length' header will be set to zero.

curl -d -u '<username>:<password>' -X POST 'http://<Datameer-server-IP>:<port-number>/rest/job-execution?configuration=<import-job-configuration-id>'