How to do multipart http get requests using mime/multipart?

829 views
Skip to first unread message

Randall McPherson

unread,
Aug 4, 2013, 8:17:36 PM8/4/13
to golan...@googlegroups.com
I've seen several discussions about using mime/multipart along with net/http/request to create multipart post requests (for instance, here: https://groups.google.com/d/msg/golang-nuts/Zjg5l4nKcQ0/wWEw6rJNkJ8J) and this blog post (http://matt.aimonetti.net/posts/2013/07/01/golang-multipart-file-upload-example/), but I haven't found any discussion of using a similar technique to do a multipart get request for fast concurrent downloading.

I realize the content-length of the data to be downloaded would probably be needed, but I was hoping to be able to do this in a similar way without setting up ranged requests. Does anyone know of a way to do this or, if not, what is an idiomatic way of achieving this in go? 

Tamás Gulácsi

unread,
Aug 5, 2013, 4:03:40 AM8/5/13
to golan...@googlegroups.com
Sorry, but what is a multipart GET? GET should not have body... What is the service (server, other end)?

Randall McPherson

unread,
Aug 5, 2013, 6:08:03 PM8/5/13
to golan...@googlegroups.com
Sorry, I phrased my question incorrectly. I was asking if it was possible to use a multipart reader to do automatically do ranged http get requests (with the range header) to download parts concurrently. Looking at the documentation for the mime/multipart package, I think the answer is no. 

Brad Fitzpatrick

unread,
Aug 5, 2013, 8:12:49 PM8/5/13
to Randall McPherson, golang-nuts
I'm still not quite sure what you're trying to do.



--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Jesse McNelis

unread,
Aug 6, 2013, 12:56:33 AM8/6/13
to Randall McPherson, golang-nuts
On Tue, Aug 6, 2013 at 8:08 AM, Randall McPherson <rlmcp...@gmail.com> wrote:
Sorry, I phrased my question incorrectly. I was asking if it was possible to use a multipart reader to do automatically do ranged http get requests (with the range header) to download parts concurrently. Looking at the documentation for the mime/multipart package, I think the answer is no. 

If you're trying to do pipelining then you probably want to look at SPDY instead. Which does basically what you're describing.

 

--
=====================
http://jessta.id.au

Reply all
Reply to author
Forward
0 new messages