This is a migrated thread and some comments may be shown as answers.

New to Fiddler on Windows 7 - Need Insights (CURL, PHP)

2 Answers 17 Views
FiddlerCore
This is a migrated thread and some comments may be shown as answers.
Casey
Top achievements
Rank 1
Casey asked on 10 Feb 2015, 03:38 PM
I've installed Fiddler on my Windows 7 machine and I'm trying to execute the following PHP CURL routine so that I can see the POST request body in Fiddler:

01.$proxy = 'http://localhost:8888';
02. 
03.$ch = curl_init();
04.$curlConfig = array(
05.    CURLOPT_URL             => "http://localhost/projects/curl_1/test.php",
06.    CURLOPT_POST                    => true,
07.    CURLOPT_RETURNTRANSFER  => true,
08.    CURLOPT_PROXY           => $proxy,
09.    CURLOPT_HTTPPROXYTUNNEL => true,
10.    CURLOPT_POSTFIELDS      => array(
11.        'test1' => 'blah',
12.        'test2' => 'more blah',
13.    )
14.);
15.curl_setopt_array($ch, $curlConfig);
16.$result = curl_exec($ch);

Whenever I visit the page, however, all I see in Fiddler is a GET request--not a POST request.

What do I need to do / configure in Fiddler to see the POST requests? I don't have the HTTPS Decryption enabled but that's because I shouldn't need to enable it for basic HTTP debugging (I'm not working with any SSL projects at the moment).

2 Answers, 1 is accepted

Sort by
0
Eric Lawrence
Telerik team
answered on 10 Feb 2015, 05:03 PM
Hello, Casey--

You're seeing the GET request from your browser, and not seeing the request from the backend server process.

The likely problem here is that you've set CURLOPT_HTTPPROXY_TUNNEL which could be named CURLOPT_DO_NON_STANDARD_CRAZINESS_AND_DONT_USE_PROXY_PROPERLY.

Unset that option.

If you're still having problems, try leaving the option unset and change the target URL to http://doesnotexist.example.com/projects/curl_1/test.php. Do you see the request then?

Regards,
Eric Lawrence
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Casey
Top achievements
Rank 1
answered on 10 Feb 2015, 05:06 PM
Eric, your first suggestion did it. I'm FINALLY seeing POSTs! Thank you so much!

(And major props for the quick response.)
Tags
FiddlerCore
Asked by
Casey
Top achievements
Rank 1
Answers by
Eric Lawrence
Telerik team
Casey
Top achievements
Rank 1
Share this question
or