Advertisement
Guest User

2

a guest
Feb 20th, 2019
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.71 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 textVar;
  25. textVar = textBox1.Text;
  26. string finalAPI = String.Concat(apiURL, textVar);
  27. string strurltest = String.Format(finalAPI);
  28.  
  29. WebRequest requestObjGet = WebRequest.Create(strurltest);
  30. requestObjGet.Method = "GET";
  31. HttpWebResponse responseObjGet = null;
  32. responseObjGet = (HttpWebResponse)requestObjGet.GetResponse();
  33.  
  34. string strresulttest = null;
  35. using (Stream stream = responseObjGet.GetResponseStream())
  36. {
  37. StreamReader sr = new StreamReader(stream);
  38. strresulttest = sr.ReadToEnd();
  39. sr.Close();
  40. }
  41.  
  42.  
  43. InitializeComponent();
  44. }
  45.  
  46.  
  47.  
  48.  
  49. protected void Form1_Load(object sender, EventArgs e)
  50. {
  51.  
  52.  
  53. }
  54.  
  55. private void TextBox1_TextChanged(object sender, EventArgs e)
  56. {
  57.  
  58. }
  59. private void Button1_Click(object sender, EventArgs e)
  60. {
  61. string textVar;
  62. textVar = textBox1.Text;
  63. Console.WriteLine(textVar);
  64. }
  65.  
  66. }
  67. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement