URL withPOSTData and Content-Type:application/octet-stream


I am using juce::URL with POST data to talk to a 3rd party API. It accepts POST data with Content-Type : application/octet-stream and requires that I be able to encode all numbers in it. I have been using createInputStream(true, nullptr, nullptr, headers) to add custom headers.

Could URL store post data as a MemoryBlock internally (it is copied to a MemoryBlock anyway internally)?

* withPOSTData(const String& postData) method could convert String to MemoryBlock and store

* withPOSTData(const MemoryBlock& postData) could be added


Or is there another way to do this that I have missed?


Sure, we could probably add a memoryblock version - will do that as soon as poss!


Thanks Jules,

That would be really useful. Will it be very soon (next week-ish)? Cause if not I will start doing a version of my own.

I'm quite new to HTML so I could submit a patch but it probably wouldn't be as neat/correct as someone who had a bit more experience in the area.



Can probably do it next week, but if you wanted to send over some changes as a starting point, that always gets things done quicker!


Thanks Jules! I was about to send a patch yesterday and you had already done it. :)