Created
June 20, 2018 15:05
-
-
Save paulohenriquesn/203e0edb9c1e57234abcdc22d4304410 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static async void GetResponse(string server,string @params) | |
{ | |
httpWebRequest = (HttpWebRequest)WebRequest.Create($"http://{server}/{@params}"); | |
HttpWebResponse httpWebResponse = (HttpWebResponse)httpWebRequest.GetResponse(); | |
string method = httpWebResponse.Method; | |
if (String.Compare(method, "GET") == 0) | |
{ | |
Stream receiveStream = httpWebResponse.GetResponseStream(); | |
StreamReader readStream = new StreamReader(receiveStream, Encoding.UTF8); | |
// MessageBox.Show(readStream.ReadToEnd()); | |
response = readStream.ReadToEnd(); | |
httpWebResponse.Close(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
example:
GetResponse("localhost","?getgameName&getgameVersion&getgameRegion");
even
http://localhost:80?getgameName&getgameVersion&getgameRegion/