File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -114,3 +114,24 @@ paths:
114
114
username: admin
115
115
password: secret
116
116
` ` `
117
+
118
+ # # Multipart Form Data
119
+
120
+ To send `multipart/form-data` (typically for file upload), define the `body` fields and file paths :
121
+
122
+ ` ` ` yaml
123
+ paths:
124
+ - endpoint: /upload
125
+ name: upload
126
+ method: POST
127
+ headers:
128
+ Content-Type: multipart/form-data
129
+ body:
130
+ title: lorem
131
+ file: "./path/file.png"
132
+ ` ` `
133
+
134
+ - `headers.Content-Type` : Should be set to `multipart/form-data` to indicate file upload.
135
+ - `body` : Key-value pairs to be sent. For file fields, use a relative or absolute path to the file.
136
+
137
+ > Note: Files are automatically detected if the value is a valid path to a local file.
You can’t perform that action at this time.
0 commit comments