- Home /
Question by
Recalc · Jun 18, 2018 at 09:25 PM ·
networkhttpwebrequest
How do I make this GET request in Unity?
curl 'https://api.sketchfab.com/v3/models/{UID}/download' -H 'authorization: Bearer {INSERT_USER_OAUTH_ACCESS_TOKEN}'
I'm trying to make this API call but it doesn't appear to be working. I essentially have :
public void loadFromSF()
{
//
string url = "'https://api.sketchfab.com/v3/models/" + modelID + "/download'";
//
//string url2 = "'authorization: Bearer { "+token+"}'";
string url2 = "'authorization: Bearer " + token + "'";
//Get request
StartCoroutine(Req(url, url2));
}
IEnumerator Req(string url,string url2){
//Get request
WWW req = new WWW(url + " -H " + url2);
yield return req;
Debug.Log(req.text);
}
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220612165018im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
UnityWebRequest very slow 1 Answer
Detecting network failure with IAsyncResult 1 Answer
Network strategies for smartphone games 2 Answers
Connect on Lan 1 Answer