Well, I assume you didn't use the example as is, but replaced it with your desired data ?
1. forget about the Accept: line, as you probably wanna receive plain text
2. User-Agent: and Connection: are optional as well
3. important is to finish all lines with CR+LF
4. request body must be seperated from request header by an empty line
5. Content-Length: is the length of the request body starting after the empty line
Well, it might be, that the API in question does not only expect to use the POST method, but also the Content-Type: multipart/formdata (instead of the application/x-www-form-urlencoded), but I've never needed that encoding for my uses, hence I don't know the specs, but it's probably documented in the HTTP protocol (see link below the example in my last post).