get requests returning 504 - 07/03/15 01:49 AM
This might not be a 100% mIRC script related question but not sure where else to ask.
I have just started creating my own bot for twitch.tv and I wan't to use Riot games API to get data about the streamer.
I have tried for multiple hours without any luck so here is what I have tired:
this is the get request I got from the Riot API:
and request headers(not sure if these are relevant?)
First of I am not sure what my host should be(in sockopen). I have tried with and with option e combined with and just
I have also tried to use euw.api.pvp.net but that gave an error(couldn't make the connection)
I have also tried a few different things for the GET request with no luck(like with or without the "euw.api.pvp.net" part and "https"
So if I get to establish the connection and send the request I get an error 504(timeout) after 30-60 secounds
here is the riot api documentation if it is needed to get a better understanding of what my problem is: https://developer.riotgames.com/
I hope you get the essence of what my problem is and can give me some help to solve it.
Sorry for bad english, it is pretty late and english isn't my native language
I have just started creating my own bot for twitch.tv and I wan't to use Riot games API to get data about the streamer.
I have tried for multiple hours without any luck so here is what I have tired:
Code:
on *:TEXT:!Rank:#: { sockclose http sockopen -e http developer.riotgames.com 80 } on *:SockOpen:http: { msg $chan connection made.. sockwrite http GET /https://euw.api.pvp.net/api/lol/euw/v2.5/league/by-summoner/27028362/entry?api_key=4dceac67-7859-4fe6-8b32-3dc93f604d86 HTTP/1.1 msg $chan request send } on *:SockRead:http: { msg $chan recv data if ($sockerr > 0) return :nextread sockread %temp if ($sockbr == 0) return msg $chan %temp goto nextread }
this is the get request I got from the Riot API:
Code:
https://euw.api.pvp.net/api/lol/euw/v2.5/league/by-summoner/27028362/entry?api_key=4dceac67-7859-4fe6-8b32-3dc93f604d86
and request headers(not sure if these are relevant?)
Code:
User-Agent: Riot-Games-Developer-Portal Accept-Language: en-US Accept-Charset: ISO-8859-1,utf-8 Origin: https://developer.riotgames.com
First of I am not sure what my host should be(in sockopen). I have tried with
Code:
https://developer.riotgames.com
Html:
www.developer.riotgames.com
Html:
developer.riotgames.com
I have also tried to use euw.api.pvp.net but that gave an error(couldn't make the connection)
I have also tried a few different things for the GET request with no luck(like with or without the "euw.api.pvp.net" part and "https"
So if I get to establish the connection and send the request I get an error 504(timeout) after 30-60 secounds
here is the riot api documentation if it is needed to get a better understanding of what my problem is: https://developer.riotgames.com/
I hope you get the essence of what my problem is and can give me some help to solve it.
Sorry for bad english, it is pretty late and english isn't my native language