Editing and Replaying Requests in the HTTP Monitor
See Also
You can replay HTTP requests that are associated with the current records and
the saved records in the HTTP Monitor window. When you replay a request, the
response appears in the web browser. Note that if the server or the web module
is not running, an error message is displayed. If this happens, re-execute the
module on the target server.
|
Note that the cache configuration in
certain browsers can cause problems with replaying requests. If you encounter
such problems, bypass the cache by clicking Reload on your browser
after the monitor issues the request.
|
 |
If a servlet or JSP page reads data directly from the ServletInputStream
as opposed to using methods from the getParameter family,
requests to that resource will not replay correctly.
|
To replay an HTTP request on the server:
- In the HTTP Monitor Records pane, right-click the monitor record
that you want to replay.
- Choose Replay from the contextual menu. The page resulting from the request
appears in the web browser.
To edit and replay an HTTP request:
- In the HTTP Monitor Records pane, right-click the record that
you want to edit.
- Choose Edit and Replay from the contextual menu. The Edit and Replay dialog
box appears. It enables you to modify query parameters, request information,
or headers before sending the request. You can also send the request to a
different server.
- Edit information about the request. The following sections
describe the information that you can edit
in the HTTP Monitor's Edit and Replay dialog box.
- Click Send HTTP Request.
To edit query parameters:
- Click the Query tab.
- To add a query, click Add Parameter. The Add Parameter
dialog box appears. Type in a name and value, and click OK. The query parameters appear in
the Query tab.
- To edit a query parameter, click the elipsis button next to the parameter.
- To delete a query parameter, select the parameter and click Delete
Parameters. Use the Shift or Control key to select multiple parameters
for deletion.
To edit request data:
- Click the Request tab.
- To edit the Request URI parameter or the Protocol parameter,
click the ellipsis button next
to the parameter.
- To change the request method, select the desired method from the combo box
in the Method parameter. For instance, change GET to POST.
To edit cookies:
Session cookies are handled according to the settings
specified on the HTTP Monitor toolbar.
- If you click "Use the browser's session
cookie for replay," the server ignores the values that were saved
when the record was
recorded, and the server uses the cookie that the browser generates.
- If you click "Use the recorded session cookie for replay,"
the server either uses the cookie that is associated with the record's
session, or, if you edited a cookie, the server uses
the edited cookie.
- If the record header does not include a session cookie, the browser
will not send a cookie.
The following steps show how to edit cookies in the
Cookies tab. You can also edit cookies in the Header tab.
Not all servers support the editing of cookies.
- Click the Cookies tab.
- To add a cookie, click Add Cookie. The Add Cookie
dialog box appears. Type in a name and value, and click OK.
- To edit a cookie, click the ellipses button next to the
cookie.
- To delete a cookie, select the cookie and click Delete Cookies. Use
the Shift or Control key to select multiple
cookies for deletion.
To edit request headers:
- Click the Headers tab.
- To add a header, click Add Header.
The Add Header dialog box appears. Type in a name and value and click OK.
- To edit a header parameter such as Accept, Connection, Host, or User-Agent,
click the ellipsis button next to the parameter.
- To delete a header, select it and click Delete Headers. Use the Shift or
Control key to select multiple headers for deletion.
To send a request to a different server:
- To edit server information, such as the hostname of servlet engine or the port number
of an HTTP service, click the Server tab.
- To change a parameter's value, click the ellipsis button next
to the parameter. Note that the server must be configured
to work with the HTTP Monitor. Otherwise, the server will not replay the
request properly. For more information, see
Deploying the HTTP Monitor for a Web Application.
Legal Notices