You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 9, 2017. It is now read-only.
Hello,
Here a simple code to access REST api from imageshack, but I have always the
same response:
{"success":true,"process_time":57,"result":{"max_filesize":25600000,"space_limit
":52428800,"space_used":1,"space_left":5242880,"passed":0,"failed":0,"total":0,"
images":[]}}
Here my code:
WebResource resourceUpload = client.resource("http://api.imageshack.us/v1/images");
ObjectMapper mapper = new ObjectMapper();
//LOGIN
try {
LoginDto loginDto = loginToImageshack();
// UPLOAD
String response = resourceUpload
.queryParam("key", "****")
.queryParam("url", "http://url_to_image")
.queryParam("auth_token", loginDto.getResult().getAuth_token())
.queryParam("format", "json")
.accept(MediaType.APPLICATION_JSON)
.header("Content-Type", "multipart/form-data")
.post(String.class);
System.out.println(response);
do you have an idea ?
Thanks for your response
Original issue reported on code.google.com by cle.ba...@gmail.com on 24 Feb 2014 at 8:29