This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* request 背后也是用的 form-data. 符合浏览器的 window.FromData 规范生产 body 及 header 信息. | |
* smfile 需要是 stream, 从而判定为文件. | |
* 另: formstream 应该也可以, 但没有测试过. | |
*/ | |
const fs = require('fs') | |
const axios = require('axios') | |
const request = require('request-promise') | |
const FormData = require('form-data') |