Nexial Automation

Test Automation Platform for everyone!

X

ws » delete(url,body,var)

Description

This command sends a HTTP DELETE request to perform delete operation with the given url and body (request payload).

To learn about how to utilize the response returned from the target URL, click here.

Expressing body as file content

Note that this command support automatic content resolution via:

  • Fully qualified file path, or
  • URL (GET only)
    • When the body parameter contains a valid URL, Nexial’s default behavior is to treat it as is(meaning, Nexial won’t resolve its content). One can instruct Nexial to automatically resolve the underlying content by setting the nexial.resolveTextAsURL to true.

When body is specified as a fully qualified file path or a valid URL, Nexial will attempt to extract the corresponding file content as the request payload. Such content can be resolved as text or binary content depending on the Content-Type header defined (via head(url,var)) prior to the execution of this command. Alternatively, one can enforce Nexial to treat the corresponding file content as binary via the nexial.ws.requestPayloadAsRaw System variable.

In addition, if the corresponding file content is to be treated as text, the following System variables may have some impact as well:

Parameters

  • url - the target URL
  • body - the payload to be sent to target endpoint. If not required, use (empty) to denote no payload to be sent.
  • var - the variable to hold the response

Example

See Also