Skip to content

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

Description

@app4v

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:""}
车库号码中的‘浙’会变成乱码。

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions