561380
声明参数对象
var queryData = {
"a": "1",
"b": "2",
"c": "3",
"d": {
"code_str": "/9j/4AAQSkZJRgABAg……"
}
};
以上code_str的值就是base64格式的字符串,就是一个图片。
var options = {
method: 'POST',
url: 'http://localhost:8088/api/checkcode',
form: {
'j': JSON.stringify(queryData)
},
};
然后用request(options,function(err,res,body){});来发送请求
奇怪的问题就在于本地接收的这个请求程序(http://localhost:8088)获取不到参数j,但如果code_str参数值没有那么长,就能获取到j参数值。 求各路大神大仙指教。