0

I hope you're all well. I am trying to use C# and the request.post command to autofill a login page. I've shown the snippet of code I'm dealing with below.

My main concern currently is the 'POST DATA GOES HERE' .I'm unsure how I can gather the post-data as well as what syntax / format i would need to put it in.

I've already tried using Fiddler and Charles Proxy (HTTP Debuggers) to find anything about PostData . I did find some things I needed : User-Agent / Success Keys but those currently aren't relevant.

//Send a Post request to the (URL, postdata, contenttype) - store the HTTP Response into Response 
var Response = Request.Post(LOGIN_URL, "{post data goes here}", "content type goes here `application/java`");
  • I think your postdata will be something like`var postdata = new NameValueCollection(); postdata["username"] = "username"; postdata["password"] = "password";` – Hasta Tamang Jul 22 '19 at 21:47
  • What is Request? What library are you using? There are many ways of doing this. Check [here](https://stackoverflow.com/questions/4015324/how-to-make-http-post-web-request) – Hasta Tamang Jul 22 '19 at 21:49
  • Thank you :) For both your reply and linked tutorial both are helpful. I'm mainly hoping to have all post data inside {} instead of as variable(s) . I'm using leaf.xnet . Still hoping for information on gathering postdata if anyone thinks they can help. – Freddie Moore Jul 23 '19 at 16:03

0 Answers0