UrlEncoded and Multipart Http Form Editing

Http forms are used to submit 'form' based input from HTML forms, or sometimes from APIs. There are two kinds of Http forms:

  • UrlEncoded forms (standard HTML input forms)
    Content Type: application/x-www-form-urlencoded

  • Multi-Part forms (used for binary and large content)
    Content Type: multipart/form

Both of these forms are supported in WebSurge and it is entered and displayed in the

There are number of ways you can capture form data in WebSurge:

  • Manual Entry in the Request Editor
  • Manual Entry in the Previewer
  • Interactive Form Editor

Here's a screen cast that shows these various modes in operation:

Form Editing in West Wind WebSurge

There's also the ability to capture form data via the Request Capture Window which lets you browse a site and capture all Http requests including form data from POST/PUT operations. Please see that topic for more information.

Manual Entry in Request Editor and Previewer

Form data - excluding binary data in multipart forms - is just text and as such you can simply enter form data directly in the Request content control in the Request editor, or - edit rendered output in the Previewer.

UrlEncoded Content

UrlEncoded content in the Request Editor looks like this:

Note that data is in raw urlencoded format meaning anything you enter here has to be UrlEncoded.

To make this process easier you can instead switch to the Previewer, which shows the value in nicely formatted way and also, and allows editing the values as simple key\value pairs with plain text for the values:

Notice that the values here are plain text, and don't need to be UrlEncoded! To show the UrlEncoded content, you can click on the formatted urlencoded checkbox toggle between formatted and raw modes.

Multipart Content

Multipart content can also be edited in the raw editor. Multipart content is defined by:

  • A multipart/form-data; boundary=<boundary> header
  • A <boundary> line before each variable (plus 2 leading --)
  • A Content-Disposition header
  • An optional Content-Type header that describes the data
  • A blank line
  • The actual data (text or binary)
  • Binary data in this editor has to be base64 with a B64_ prefix
  • A final <boundary> (plus leading and trailing --)

Here's what this looks like in the editor

Unlike UrlEncoded forms the Previewer provides no special, helpful view of multipart data, but you can use the Interactive Form Editor to edit form data, including embedding binary file content.

The Interactive Form Editor

In addition to the manual editor methods shown above, WebSurge also provides an interactive form editor for UrlEncoded and Multipart forms. To bring up the form you can use:

  • Right click in Request Editor's Content Field and use Toggle Form Editor
  • Click on the button in the upper right corner of the editor

For UrlEncoded forms the editor shows simple entry fields Key and Values that you can fill:

For Multipart forms you get additional input fields for content type and file name, plus the option to load a file from disk to embed:

You can add new form variables, or delete existing ones.

When you're done click on the button, or use the context menu to Toggle Form Editor to switch back to the Request Editor.


© West Wind Technologies, 2014-2022 • Updated: 03/02/22
Comment or report problem with topic