Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Accessing multipart capability directly
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
kevin.trumpet...@gmail.com  
View profile  
 More options Nov 17 2012, 12:14 pm
From: kevin.trumpet...@gmail.com
Date: Sat, 17 Nov 2012 09:14:46 -0800 (PST)
Local: Sat, Nov 17 2012 12:14 pm
Subject: Accessing multipart capability directly

Hi - we are working with a REST service that allows for uploading of
files.  The way this works is we submit an upload preparation request.  The
response is a URL that we need to send the multi-part post with the file
to.  This URL contains parameters, etc...

I can't figure out how to use CRest to do the second post - if we set the
endpoint to the full URL, CRest fails with IllegalArgumentException: Given
url contains a query string

I could manually strip off the query string to get an endpoint, but then I
still have to somehow parse out each of the parameters and figure out how
to push them into the request.  This feels like the tail wagging the dog.

I'm wondering if there is a way to take advantage of the CRest multi-part
upload capability and just send the post directly to the URL?  Or is there
a more elegant way of doing this.

I could add an extra dependency to Apache's HttpClient, but I'd really
rather avoid that if at all possible.  Clearly, CRest has this
functionality - it's just a matter of figuring out how to get access to it.

Thanks,

- Kevin


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.