Skip to main content

HTTP

axios

Request data type — formData

import qs from 'query-string';

axios.post({
url: 'XXX',
data: qs.stringify(data),
headers: {
'content-type': 'application/x-www-form-urlencoded',
}
})
data = {
name: 'amy',
age: 18,
};
qs.stringify(data); // "name=amy&age=18"