Jan Doggen
Jan Doggen

Reputation: 9096

Fiddler only seeing HTTP response, not request

I have a sending and receiving testapp. The sender uses TIdHTTP:

IdHTTP.ProxyParams.ProxyServer := '127.0.0.1';
IdHTTP.ProxyParams.ProxyPort := 8888;
IdHTTP.Request.ContentType := 'application/json';
..
lResponse := IdHTTP.Post('http://127.0.0.1:8085/ttposttest',lRequest);  // Or localhost:8085

Issue: In Fiddler, I see the response coming from the receiver, but not the request going to it.

Do I have to set a proxy in the receiving app as well?
If so, where in the code?
Receiver is a TWebAction on a TWebModule, with handler:

procedure TWebModuleWebServices.WebModuleWebServicesTTPostTestAction(
  Sender: TObject; Request: TWebRequest; Response: TWebResponse;
  var Handled: Boolean);
var S: String;
begin
   S := Request.Content;
   Handled := true;
end; 

It uses TIdHTTPWebBrokerBridge:

  FWebBrokerBridge := TIdHTTPWebBrokerBridge.Create(Self);
  // Register web module class.
  FWebBrokerBridge.RegisterWebModuleClass(TWebModuleWebServices);
  // Settings:
  FWebBrokerBridge.DefaultPort := 8085;        

Upvotes: 2

Views: 2564

Answers (1)

EricLaw
EricLaw

Reputation: 57085

I suspect you're confused about the Fiddler UI; Fiddler can't see a response without seeing the request that generated that response. In Fiddler, select the Web Session in the list at the left. Double-click it. The Inspectors tab will open on the right. At the top of the Inspectors tab are the Request Inspector tabs, and at the bottom are the Response Inspector tabs.

If for some reason the Request Inspector tabs seem to be missing, drag the light-blue divider line down from the top so that they are visible again. If you don't see that line, restart Fiddler while holding the SHIFT key and this will reset Fiddler to its default UI layout.

Upvotes: 4

Related Questions