C# 如何通过将curl更改为WWWform在unity中使用curl

C# 如何通过将curl更改为WWWform在unity中使用curl,c#,unity3d,C#,Unity3d,我需要进行身份验证以使用特定的MapAPI,这是身份验证方法curl 但我不知道如何通过将curl改为form来使用它 curl "https://naveropenapi.apigw.ntruss.com/map-static/v2/raster?w=300&h=300&center=127.1054221,37.3591614&level=16" \ -H "X-NCP-APIGW-API-KEY-ID: {client id}" \ -H "X-NCP-APIGW-

我需要进行身份验证以使用特定的MapAPI,这是身份验证方法curl

但我不知道如何通过将curl改为form来使用它

curl "https://naveropenapi.apigw.ntruss.com/map-static/v2/raster?w=300&h=300&center=127.1054221,37.3591614&level=16" \
-H "X-NCP-APIGW-API-KEY-ID: {client id}" \
-H "X-NCP-APIGW-API-KEY: {client secret}" -v

请教我方法。

您需要为请求设置标题。你可以用口述词来表达

Dictionary<string, string> headers = new Dictionary<string, string>();
headers.Add("X-NCP-APIGW-API-KEY-ID", "{client id}");
headers.Add("X-NCP-APIGW-API-KEY", "{client secret}");

WWW www = new WWW("https://naveropenapi.apigw.ntruss.com/map-static/v2/raster?w=300&h=300&center=127.1054221,37.3591614&level=16", null, headers);
yield return www;

Debug.Log(www.text);
Dictionary headers=newdictionary();
headers.Add(“X-NCP-APIGW-API-KEY-ID”,“{client ID}”);
添加(“X-NCP-APIGW-API-KEY”,“{client secret}”);
WWW=新WWW(“https://naveropenapi.apigw.ntruss.com/map-static/v2/raster?w=300&h=300¢er=127.1054221,37.3591614&level=16“,空,标题);
收益率;
Debug.Log(www.text);

可能还想澄清start例程的需要,以解释
收益返回www