Response Handling Criteria

This section describes the various response-handling criteria for the HTTP responses.

Success or Failure

If you do not specify any response-handling criteria for either success or failure, the HTTP response is always success.

Otherwise:

  • Failure criteria are evaluated before success criteria. As soon as a match is found on a fail criterion, the response is set to failure and the remaining fail match conditions, if there are any, are not evaluated.
  • If no failure criteria are matched, the success criteria are then evaluated.

If no success criteria are configured, the response will always be success as long as no fail criteria were previously matched.

Otherwise:

  • If you specify at least one success criterion, there must be a match on a success criterion for the response to be success. In other words, if any success criteria are configured but not matched, the response will be failure.

Both failure and success criteria are considered in the order in which they appear in the template.

Criteria With and Without Payload

You can set separate criteria for the same status code. For example, you can set one criterion on a status with payload as success and another criterion on the same code without payload as failure.

Or, you can set separate criteria for the same status code with payload of different content types. For example, payload of type application/xml and application/xhtml+xml might be success and payload of other types could be failure.

Content Types for Payload

You can specify the content type for the payload using the dropdown that displays for requests for which the Expect Payload checkbox is selected.

If you do not know the content type but the request expects payload, use */* to specify all content types.

This configuration returns a success response for a 200 status code with an XML payload. Any other code will cause the request to return a failure response.

Response Handling Criteria