Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

api调用中文会出现乱码,可以解决一下吗? #1

Open
app4v opened this issue Jun 8, 2021 · 0 comments
Open

api调用中文会出现乱码,可以解决一下吗? #1

app4v opened this issue Jun 8, 2021 · 0 comments

Comments

@app4v
Copy link

app4v commented Jun 8, 2021

let body=JSON.stringify([ { "clientId": 1, "plateNo": "浙A111111", "plateType": "1", "plateColor": "1", "vehicleType": "0", "vehicleColor": "0", "description": "test" } ] ); let httpRes=await Hikopenapi.httpPost(requestUrl+"/api/resource/v1/vehicle/batch/add",headers,body,appKey,appSecret,timeout); const buff = Buffer.from(JSON.parse(httpRes).data, 'base64').toString('utf-8'); console.log(buff);  //{"status":true,error:0,data:""}
车库号码中的‘浙’会变成乱码。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant