responseText

Before we discuss the extensions that we can use for debugging our applications, we will cover one more form of alert debugging. For a quick and dirty look at the response received from an XHR, we could use the responseText property. This property is a part of the XHR object and returns a string version of any response received from the server. This includes XML, plain text, JSON, and so on. It can be helpful when used with alert debugging to get an idea of the document structure with which you are interacting. After the structure is known, it is easy to plan an approach for targeting specific items in the response. When working with XML, we can see the structure of the nodes and how they are encapsulated with their parents and ancestors, ...

Get Ajax for Web Application Developers now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.