Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Studio Chat / [SOLVED] Help with Agk send HTTP string and returned JSON output

Author
Message
DannyD
6
Years of Service
User Offline
Joined: 29th Aug 2017
Location:
Posted: 25th Sep 2020 06:19 Edited at: 25th Sep 2020 06:21
Hi All

I need to send a request via HTTP - AppGameKit - SetHTTPHost / the provider give me
I have tried a few options, but keep getting a blank response

I can run the string from the browser and it return JSON output, but can't get a response in AGK
(I know this specific string send is working)



The output in the Browser will look like the following image



Thanks

Attachments

Login to view attachments

The author of this post has marked a post as an answer.

Go to answer

McFish
8
Years of Service
User Offline
Joined: 10th Nov 2015
Location: Finland
Posted: 25th Sep 2020 06:39
This post has been marked by the post author as the answer.
Try this line:

SetHTTPHost(con , "https://mywebsite.cn/api/v1/students?auth_token=123123123123123&since_id=502864s" ,1)

without "https://" -prefix... Manual says you shouldn't add it to host:

https://www.appgamekit.com/documentation/Reference/HTTP/SetHTTPHost.htm
DannyD
6
Years of Service
User Offline
Joined: 29th Aug 2017
Location:
Posted: 25th Sep 2020 07:07
Thanks McFish

Dunno how I miss that.
Finally code which works perfect


Appreciate

Login to post a reply

Server time is: 2024-04-19 17:44:51
Your offset time is: 2024-04-19 17:44:51