Android Question HttpJob POST response

udg

Expert
Licensed User
Hi all,

sorry for the unclear subject but it was difficult to find a proper one.

The problem: I am using PostBytes to send data to an Amazon server imitating in code the multipart/form-data upload protocol as sent by a form, but the JobDone function is never fired.

Sniffing data and analyzing it with Wireshark, I know the POST is successful since a packet is returned by the Amazon's server where I can read the location where my uploaded file went stored.

Maybe the problem arises from Amazon replying with code 204 (HTTP/1.1 204 No Content) and HttpJob expecting 200 (OK) for a successful operation or 4xx for errors. I don't know.

Is there anyway to manage this situation?

TIA

udg
 
Last edited:

udg

Expert
Licensed User
It was easier to find a solution than a proper thread subject :)

I solved dimming an HttpRequest and an HttpClient objects along with its ResponseSuccess function.

Anyway, I'm inclined to leave the thread open so more knowledgeable members could better explain the whole matter.

udg

ps: @DonManfred with that i finally solved the file upload problem with the PushBullet library :)
 

udg

Expert
Licensed User
Hi Manfred,

I can confirm I receive an HTTP code 204 from Amazon server where a key namen "Location" contains reference to the uploaded file.
I've yet to complete the last easy step and clean up some old code in order to have my PB class ready.
As soon as I am ready I'll mail it to you or if you just need a quick look at the snippet tested yesterday just PM me and I'll send you that.

udg
 
Top