First, this approach can be a problem with the encoding. Not any characters can be written in the body of the request, it all depends on Content-encoding. But I do not know, it is necessary to try.
The most reliable method now is to convert all numbers to strings, and these strings to write to the request, separating, for example, space. Don't know if this is the solution to your problem, but it will be easier to check the correctness of the request, and receive data on the server.
If you're doing as you try (write request the bytes representing the integers), then record to a string so you need:
Then it will capture the entire array as a whole. And you get that bytes are written until, until it encounters the null byte. And in the view int as zero bytes are common. In Content_length need to specify the number of bytes in the request body, i.e. the bufferLength*sizeof(int).