Example: Deleting a file from a file space
You can delete a file from your file space by submitting an HTTP request to the WebSphere® MQ File Transfer Edition Web Gateway. If you set the header x-fte-include-file-in-response to true, the contents of the file are returned in the HTTP response from the Web Gateway.
About this task
The following steps describe how to submit a request. In this example, the server hosting the WebSphere MQ File Transfer Edition Web Gateway is example.com. The name of the file space is jack, it contains a file report.txt, and the user requesting the file deletion is the owner of the file space. The transfer ID 414d5120514d5f67617265746862202067732c4c20c25a03 is the hexadecimal ID of the transfer that put the file in the file space, and this ID is returned when you list the contents of a file space. For more information about the format of file space query responses, see File space query response formats.
The header x-fte-include-file-in-response:true specifies that the contents of report.txt is returned in the body of the response. If you do not specify the value of this header, it defaults to false and the file is deleted but its contents are not returned.