Remove Transfer-Encoding:chunked in the POST request?
<p>I am sending a <code>POST</code> request using the following code but the request is send in the form of chunked (<code>Transfer-Encoding: chunked</code>). I googled about the problem and it says to include the <code>Content-Length</code> but in the below code I could not figure out how could I set the <code>Content-Length</code>:</p>

<pre><code>@RequestMapping(value = "/contacts", method = RequestMethod.POST)
public Map&lt;String, ContactInfo&gt; addContactInfo(
                                @RequestBody Map&lt;String, ContactInfo&gt; ContactInfoDto) {

    ContactInfo contactInfo = ContactInfoDto.get("contact");
    if (contactInfo == null) {
        throw new IllegalArgumentException("Contact not found.");
    }

    contactInfo = this.contactInfoManager.addNew(contactInfo);
    Map&lt;String, ContactInfo&gt; map = new HashMap&lt;&gt;();
    map.put("contact", contactInfo);

    return map;

}
</code></pre>