Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jetty-users] uploading the file with httpclient

Hi again, I am trying to reproduce this command:

curl -u g208392@xxxxxxxxx -X PUT -F file=@/Users/makc/test/www.zip https://build.phonegap.com/api/v1/apps/504042

using blocking api, according to this http://www.eclipse.org/jetty/documentation/current/http-client-api.html

my code so far looks more or less like this http://hastebin.com/jacayinuba.avrasm but I am getting 500 error, while the curl command works as expected.

my concern is that I did not specify "file" part of -F, but Request.file does not have a parameter for that? How do I set it? Thanks.

Back to the top