Star

Created With

linkBinary Data

Send binary data by specifying a file path.

⚠️ Note: when using type: binary you MUST send an appropriate mime type header, such as content-type: image/png, content-type: image/jpeg, etc.

1link - name: post binary data (file) as body

2link request:

3link path: /profile-photo

4link method: post

5link headers:

6link - name: content-type

7link value: image/png

8link payload:

9link body:

10link type: binary

11link content: static/assets/image.png # <-- the image path

12link response:

13link status_code: 200

⚠️ Note: the image path should be relative to Node process's current working directory.

💡 To use a path relative to suite's path use the locate_files_relative option in the suite meta section

See also: Example: Binary Data

Binary Data

Home

Getting Startedchevron_right
Basicschevron_right
Requestchevron_right

Request Basics Headers Cookies Query Parameters Path Parameters

Payload Bodychevron_right

File Uploads Auto-Retry Additional Options

Response Validationchevron_right

Overview

Assertionschevron_right

Status Code Headers & Cookies

Bodychevron_right
Hooks & JSchevron_right

Overview

Function Typeschevron_right
Suite-Level Hookschevron_right
Spec-Level Hookschevron_right
Contextchevron_right
DRY & Reusing Specschevron_right
Command Line Interface (CLI)chevron_right