[PHP] Re: Sending multipart/form-data request with PECL.

2009-03-04 Thread Shawn McKenzie
Jason Cipriani wrote: I am trying to submit a request to an HTTP server with multipart/form-data encoded data. I'm using PECL's HttpRequest (although I'm open to alternatives). I am using PHP5. I noticed that if you call addPostFile to add a file, PECL will send the file, and all other post

[PHP] Re: Sending multipart/form-data request with PECL.

2009-03-04 Thread Manuel Lemos
Hello, on 03/04/2009 03:33 PM Jason Cipriani said the following: I am trying to submit a request to an HTTP server with multipart/form-data encoded data. I'm using PECL's HttpRequest (although I'm open to alternatives). I am using PHP5. I noticed that if you call addPostFile to add a file,

Re: [PHP] Re: Sending multipart/form-data request with PECL.

2009-03-04 Thread Jason Cipriani
On Wed, Mar 4, 2009 at 2:10 PM, Shawn McKenzie nos...@mckenzies.net wrote: Jason Cipriani wrote: Is there a way to force PECL to use multipart/form-data encoding for all post fields added with addPostFields, even when you are not calling addPostFile to add a file? Try: setContentType()

Re: [PHP] Re: Sending multipart/form-data request with PECL.

2009-03-04 Thread Shawn McKenzie
Jason Cipriani wrote: On Wed, Mar 4, 2009 at 2:10 PM, Shawn McKenzie nos...@mckenzies.net wrote: Jason Cipriani wrote: Is there a way to force PECL to use multipart/form-data encoding for all post fields added with addPostFields, even when you are not calling addPostFile to add a file? Try:

Re: [PHP] Re: Sending multipart/form-data request with PECL.

2009-03-04 Thread Jason Cipriani
On Wed, Mar 4, 2009 at 7:12 PM, Shawn McKenzie nos...@mckenzies.net wrote: Jason Cipriani wrote: On Wed, Mar 4, 2009 at 2:10 PM, Shawn McKenzie nos...@mckenzies.net wrote: Jason Cipriani wrote: Is there a way to force PECL to use multipart/form-data encoding for all post fields added with

Re: [PHP] Re: Sending multipart/form-data request with PECL.

2009-03-04 Thread Manuel Lemos
Hello, on 03/05/2009 02:31 AM Jason Cipriani said the following: Thanks. I actually had a look at the HttpRequest source code, and I can see the logic where it switches to multipart encoding if files are present but it actually appears that it's not possible to force it to do that. It's sort

Re: [PHP] Re: Sending multipart/form-data request with PECL.

2009-03-04 Thread Jason Cipriani
On Thu, Mar 5, 2009 at 12:48 AM, Manuel Lemos mle...@acm.org wrote: Hello, on 03/05/2009 02:31 AM Jason Cipriani said the following: Thanks. I actually had a look at the HttpRequest source code, and I can see the logic where it switches to multipart encoding if files are present but it

Re: [PHP] Re: Sending multipart/form-data request with PECL.

2009-03-04 Thread Manuel Lemos
Hello Jason, on 03/05/2009 03:17 AM Jason Cipriani said the following: Thanks. I actually had a look at the HttpRequest source code, and I can see the logic where it switches to multipart encoding if files are present but it actually appears that it's not possible to force it to do that. It's

Re: [PHP] Re: Sending multipart/form-data request with PECL.

2009-03-04 Thread Jason Cipriani
On Thu, Mar 5, 2009 at 1:48 AM, Manuel Lemos mle...@acm.org wrote: Hello Jason, on 03/05/2009 03:17 AM Jason Cipriani said the following: Thanks. I actually had a look at the HttpRequest source code, and I can see the logic where it switches to multipart encoding if files are present but it