How to post a form ?

When you use the POST method with the http action, the body is sent with the HTTP Header content-type: application/x-www-form-urlencoded by default.

For example:

- http:
    title: Page 4
    method: POST
    use_http2: true    # Yes ! you can use HTTP/2
    url: http://server/page4.php
    body: name=${name}&age=${age}	      # MANDATORY for POST

But you can use the formdata key to submit form fields encoded with multipart/form-data. This is necessary if your form embeds a field which type is file.

- http:
    title: Page upload
    method: POST		# only for POST methods
    url: http://yourserver/a_page.php
    formdata:
      - name: name
        value: ${a_variable} Doe
      - name: fileToUpload
        value: a_filename.txt
        type: file		# mandatory for files
      - name: submit