Send and Receive HTTP Requests Directly in XMLSpy
The HTTP protocol defines how files (text, images, etc.) are transmitted over the Internet. Every web server runs a daemon that continuously waits for HTTP requests and handles each as it arrives.
The HTTP protocol is stateless, which means that each HTTP command is carried out independently, without any reference to previous or following commands — and this can make testing and debugging a challenge.
To assist developers with this, the HTTP testing window in XMLSpy guides you through the process of creating and sending an HTTP request to a web server or API. Then, you can receive, check, and troubleshoot the response.
A request is defined in the left-hand pane of the window and may consist of:
Once the request is defined, press Send to send it to the web server. You can analyze the response immediately in the right-hand pane, which displays the body and header info.
Nine separate tabs in the HTTP window allow you to store and test multiple messages and switch between them as needed.
XMLSpy also allows you to save your HTTP requests directly in the HTTP Tester. This is useful for reusing the same setup or for documentation purposes. You can also save the HTTP response to a file or copy it to a new document to work with it further, e.g., to automatically generate a JSON or XML Schema based on the structure of a response.
The HTTP Testing Window supports multipart/form-data POST and PUT requests, the standard way web APIs accept file uploads and requests that combine several kinds of data, such as text fields, JSON, and binary files, in a single message.
Entry helpers make building a multipart request straightforward. For each part, you specify a name, choose whether it's a text value or a file, set its content type, and enter the text or select the file to upload. You can add as many parts as the API expects, so uploading several files at once, or sending a file together with its JSON metadata, is just a matter of filling in a few rows.
The HTTP window can create and test requests from an OpenAPI document that describes an API. You simply enter the location of the OpenAPI document, and the HTTP window displays the available paths with their corresponding operations. Based on the operation and parameters you select, XMLSpy autogenerates the test message, which you can send to the API, and then view the results.
You can also start from the OpenAPI file itself: right-click any operation while editing, and XMLSpy opens a ready-to-send request in the HTTP Testing Window, with the path, method, parameters, and request body filled in.
When an operation expects a multipart/form-data body, XMLSpy reads the schema and pre-populates the expected parts, including their names and types, so you just add values and file paths and send.
The HTTP Testing Window is also helpful for testing requests to any major AI API as well as analyzing AI results for prompt engineering.
After entering the URL for the AI API endpoint, you can select the content type, enter your API key in an Authorization header and optionally add an organization header. Then, enter the message body and send it to the API endpoint.
Based on the response, you may need to tweak the prompt to get better results. For instance, you might adjust the language in the prompt field of the JSON payload or experiment with different parameters to refine the output.
After making changes, you can resend the request and review the new response and repeat this process to iteratively improve the quality and relevance of the AI output.
Using the HTTP Tester to configure and send HTTP requests to an AI API makes it easy to perform comprehensive testing and refine natural language prompts. With the ability to precisely craft and tweak request payloads, experiment with various parameters, and instantly view detailed responses, developers can easily refine prompt engineering when building AI-driven solutions.
You can also initiate a test by importing a request from a WADL (Web Application Description Language) file, which provides a machine-readable description of an HTTP-based application, or a WSDL document describing SOAP web service endpoints.
The XMLSpy HTTP window includes a WADL / WSDL import wizard that walks you through opening a file, selecting a request for testing, and modifying any editable parameters of the request.
Then it imports the request into the HTTP window so you can send it and review the response.




