I use request for this (npm install request).

https://github.com/request/request#multipartform-data-multipart-form-uploads

I generally use the "advanced cases" technique.

On Mon, Feb 23, 2015 at 12:13 AM, jeevan kk <[email protected]> wrote:

> I am trying to do a multipart post request from my node.js server. How do
> I set headers for a part in my request. I am *not* referring to the
> request headers.
>
> Am trying to do something like this.
>
> POST /asset/ HTTP/1.1Host: qa:8080Authorization: Basic 1234Accept: 
> Application/jsonCache-Control: no-cacheContent-Type: multipart/form-data; 
> boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW
> ----WebKitFormBoundary7MA4YWxkTrZu0gWContent-Disposition: attachment; 
> custom_key="some_value"Content-Type: image/jpeg
>
> ----WebKitFormBoundary7MA4YWxkTrZu0gW
>
> Please note the header "Content-Disposition" which is set inside my part,
> which has a custom key and value set.
>
> How to get this done? Suggest any module which does this.
>
> --
> Job board: http://jobs.nodejs.org/
> New group rules:
> https://gist.github.com/othiym23/9886289#file-moderation-policy-md
> Old group rules:
> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
> ---
> You received this message because you are subscribed to the Google Groups
> "nodejs" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/nodejs/a64ba959-698e-4e6d-be26-11cdf75c15c0%40googlegroups.com
> <https://groups.google.com/d/msgid/nodejs/a64ba959-698e-4e6d-be26-11cdf75c15c0%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/CAPJ5V2ZXCv%3D4J7%2BehbgEaOeYcbBYxKVWduUer%3DB61W3BN-%3D90Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to