AFAIK the HTTP.Document.Position is set to 0 prior to sending it in HTTPMethod.
Second, I tried the code and HTTP.Document is not empty (you probably don't know how to read it back from the stream because that's what HTTP.Document is).
The content is this:
--463F8555_Synapse_boundary
content-disposition: form-data; name="C:\Users\Rik\Documents\test"; filename="test.ini"
Authorization: 123
Content-Type: application/json
Content-Type: Application/octet-string
[test_section]
test=test
--463F8555_Synapse_boundary--
I have two big notes on that.
1) Why two Content-Types ???
2) Why the spaces before every line?
If I remove the spaces I get this as result:
array(1) {
["C:\Users\Rik\Documents\test"]=>
array(5) {
["name"]=>
string(8) "test.ini"
["type"]=>
string(16) "application/json"
["tmp_name"]=>
string(14) "/tmp/php2Mp7fo"
["error"]=>
int(0)
["size"]=>
int(259)
}
}
So, remove the spaces in front of all the lines and just use one content-type and it should work.