Billing Overview
Pay-as-You-Go (postpaid)
Purchasing Channels
Payment Overdue
Refund Instructions
append(key: string, value: string | File): void
Type | Description |
void | No data returned. |
import http from 'pts/http';const data = open('./sample/tmp.js');export default function () {const formData = new http.FormData();// Add data with value as string.formData.append('text', 'text');// Add data with value as File.formData.append('file', http.file(data, 'tmp.js'));const resp = http.post('http://httpbin.org/post', formData.body(), {headers: {'Content-Type': formData.contentType()}});console.log('formData: ', resp.body);};
Was this page helpful?
You can also Contact sales or Submit a Ticket for help.
Help us improve! Rate your documentation experience in 5 mins.
Feedback