cURL / Mailing Lists / curl-and-php / Single Mail

curl-and-php

Re: Viewing the cURL raw request

From: Michael Wallner <mike_at_iworks.at>
Date: Fri, 14 Oct 2005 09:46:26 +0200

Hi Adam, you wrote:
> Hello everyone. This is my first post to this list and I am fairly new
> to cURL but I am picking it up pretty quickly.
>
> My question is: Is there any way to see the raw request cURL builds to
> send to a server? I need to see it to compare it to another raw
> request I grabbed using ethereal.

You could do that with PECLs http package, which also binds to libcurl.

        $message = $request->getRequestMessage();

If the request message was chunked encoded, though, you'll get
a decoded message with a content length header with this method.
You can find more information about at in the URL in my signature.

IIRC the curl extension in the yet to be released PHP-5.1 also
has an option to get the outgoing request message.

Regards,

-- 
Michael - <mike(@)php.net> http://dev.iworks.at/ext-http/http-functions.html.gz
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Received on 2005-10-14