0

The ajax request launches a struts action with empty parameters. When using dev mode on firefox and debugging the code, i can see that when the breakpoint stops inside the action, the XHR envelope on firefox is empty, no header, no request, no response, ...

enter image description here

Only when the action is done, the envelope seems to be populated with status 200 and header/request/response are filled...

enter image description here

The ajax request :

$.ajax({
       url: "searchFor",
       type: 'POST',
       dataType: 'json',
       data: JSON.stringify({Number: Number, SearchReason: $("#"+inputReason).val()}),
       contentType: 'application/json',
       //mimeType: 'application/json',
       async: false,
       success: function (data) { … }
       ...
0

1 Answer 1

0

To see the XHR when you debugging in Firefox should set a breakpoint on the URL:

Set an XHR breakpoint:

An XHR (XMLHttpRequest) breakpoint breaks code execution when an XHR request is dispatched so that you can examine the current state of the program. You can break on all requests or on those that include a specific URL. To turn on the feature:

Open the debugger

Click on “Pause on any URL” which acts as a wild card, causing the code to pause on any call, or,

Click the plus sign next to the XHR breakpoints header, enter the URL in which you are interested, and press Enter.


Also if you mind about a version of Firefox then you should read XHR Breakpoints in Firefox developer tools.


You can also see a Network Monitor:

The Network Monitor shows you all the HTTP requests Firefox makes (for example, when it loads a page, or due to XMLHttpRequests), how long each request takes, and details of each request.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.