Manually Creating Requests in the User Interface

The most obvious ways to create new requests is by entering them manually through the user interface. Requests are created in the Http Request editor, but you can also edit them live request previewer, which provides a richer syntax highlighted view of the live request data.

What's in a Request?

A request is made up of:

  • A Request Url (full qualified or site relative)
  • An Http Verb
  • A set of HTTP Headers
  • Request Content for POST/PUT requests

Create a new Request

You can add a new request by using the icon on the lower request toolbar. The request editor reflects the core request properties:

WebSurge Request Editor

In addition to Url, Verb, Headers and Content you can also provide a descriptive name to a request that is shown in the request list on the left. The list in the figure shows these descriptive names. If you don't specify one, the raw Url is displayed.

For Request Headers there's also a context menu available that provides you with a quick way to set common headers like Content-Type, Accept and Accept-Encoding with pre-set values.

This context menu is also available in the Request Headers for the Previewer.

Specifying Urls

Urls can be specified in two ways:

  • A fully qualified, absolute Url (ie. https://albumviewer.com/api/artists/1)
  • Site relative, partial Url (ie. /api/artists/1)

Site relative Urls are very useful and recommended as they make it easy to switch between configurations (dev, staging, production) or different developer configuration Web sites.

Site Base Url Configuration

For a Site relative Url to work, you need to specify a Site Base Url in the Session configuration. This base Url is then applied to any partial Url to produce a full Url to execute the request.

Note that when you create a new Http Request, it's immediately added to the Session list even before you assign a Url or Name. The session and Session List UI is updated in real time as soon as you make a change and applied immediately to any Request you run individually or in a load test, but changes are not immediately saved to a session file until explicitly saved.

Make sure to Save your Session

After adding new requests or editing existing ones, always make sure that you save your WebSurge Session. By default changes are not saved until you explicitly save using the Save button (ctrl-s) on the main toolbar.

Run and Preview an individual Request

The Request editor is a plain input form, but you can use the Preview tab in the right main panel to 'preview' the raw request in more visual Http header format. This Preview mode is also editable and can often be easier to visually edit headers and Http content.

To test individual requests you can use the Run button on the Request Toolbar, which executes the active Http Request and displays the full request and response trace in the Previewer.

  • Using the lower request toolbar icon
  • Using the Run button in the request or preview views
  • Using the Request List Context Menu and Run Request
  • Using the Main Menu Request->Run Request
  • Alt-R from anywhere

After a request has been run, the request and response are displayed in the Previewer:

WebSurge Request Preview

The previewer provides a detailed view of:

  • The Request Headers
  • Request Content (if POST/PUT)
  • Response Headers
  • Response Content

Previewer Request Headers and Content are Editable

The previewer is used both to display requests before they execute, and request and response after a request has executed. In either case the Request Headers and Request Content are editable - any changes you make in the Previewer are reflected back to the actual Http Request and then viewable in the simple Http editor.

Next: More on Running Requests


© West Wind Technologies, 2014-2023 • Updated: 12/29/21
Comment or report problem with topic