Advertisement
Guest User

Untitled

a guest
Feb 20th, 2019
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.65 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Net.Http;
  8. using System.Text;
  9. using System.Threading.Tasks;
  10. using System.Collections.Generic;
  11. using System.Windows.Forms;
  12. using System.Net;
  13. using System.Web;
  14. using System.IO;
  15.  
  16. namespace WindowsFormsApp2
  17. {
  18. public partial class Form1 : Form
  19. {
  20.  
  21. public Form1()
  22. {
  23. string apiURL = "https://ploozernet.tk/authenticate/";
  24. string finalAPI = String.Concat(apiURL, textVar);
  25. string strurltest = String.Format(finalAPI);
  26.  
  27. WebRequest requestObjGet = WebRequest.Create(strurltest);
  28. requestObjGet.Method = "GET";
  29. HttpWebResponse responseObjGet = null;
  30. responseObjGet = (HttpWebResponse)requestObjGet.GetResponse();
  31.  
  32. string strresulttest = null;
  33. using (Stream stream = responseObjGet.GetResponseStream())
  34. {
  35. StreamReader sr = new StreamReader(stream);
  36. strresulttest = sr.ReadToEnd();
  37. sr.Close();
  38. }
  39.  
  40.  
  41. InitializeComponent();
  42. }
  43.  
  44.  
  45.  
  46.  
  47. protected void Form1_Load(object sender, EventArgs e)
  48. {
  49.  
  50.  
  51. }
  52.  
  53. private void TextBox1_TextChanged(object sender, EventArgs e)
  54. {
  55.  
  56. }
  57. private void Button1_Click(object sender, EventArgs e)
  58. {
  59. string textVar;
  60. textVar = textBox1.Text;
  61. Console.WriteLine(textVar);
  62. }
  63.  
  64. }
  65. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement