Archived Forum Post

Index of archived forum posts


HTTP using Query String (GET) or POST

Mar 03 '14 at 10:24

I’ve been using the control for SOAP communications and it works great.

Now the company I’m interfacing with wants me to expand the application to fetch their website .aspx in a browser using a query string or post (see below) and process the response. This is totally new territory for me. Can this be done within the HTTP control?

Query String


<form id="Form1" method="post" action="">
        <input type="text" name="key" id="xkey" value="111111-22222-33333" />
        <input type="submit" value="Submit" />


Yes, this is very simple. To send a GET and get the response, just use QuickGetStr:

string responseBody = http.QuickGetStr("");
This will automatically use SSL/TLS because of the "https://" in the URL.

You may instead send a POST (equivalent to the FORM above) like this:

Chilkat.HttpRequest req = new Chilkat.HttpRequest();


Chilkat.HttpResponse resp = null; resp = http.PostUrlEncoded("",req); if (resp == null ) { textBox1.Text += http.LastErrorText + "rn"; return; }

string reponseBody = resp.BodyStr;


This doesn't invoke the default browser does it? That is what I need to do, pop up the web page, fill out the web form and return the html.