Re: [HTTP] Force multipart/form-data without having to call addPostFiles().

From: Date: Thu, 05 Mar 2009 10:22:03 +0000
Subject: Re: [HTTP] Force multipart/form-data without having to call addPostFiles().
References: 1  Groups: php.pecl.dev 
Request: Send a blank email to pecl-dev+get-6195@lists.php.net to get a copy of this message
Jason Cipriani wrote: > Is there a way to force it to use multipart/form-data even without > calling addPostFiles? There's currently no way to do this, but you may file a feature request against 1.7 and with a bit of luck it can go into it. > What's the best way to send multipart data without a file attached? It's a hack and generates a notice, but maybe works for you: $body = http_request_body_encode(array("key"=>"val"), array(array())); $resp = http_request(HTTP_METH_POST, URL, $body); > My second question is: > > Is there a way to send multipart/form-data encoded post requests when > the data for the file is in memory (e.g. posted to a PHP script and > you are echoing it to another server) rather than in a server-side > file? Not currently, sorry. Regards, Mike

« previous php.pecl.dev (#6195) next »