How to make a HTTP request.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Maidenz08
    New Member
    • Sep 2007
    • 31

    #1

    How to make a HTTP request.

    Hi,

    How do i make a http request in asp.net. I need to send an sms. I have an account with a provider. So all i have to do is do a http request like http://www.provider.co m/NUMBER=12345678 90&MSG=Test+Msg .

    I can do response.redire ct("http://www.provider.co m/NUMBER=12345678 90&MSG=Test+Msg " but it goes to another page out of my application.

    Regards,
    Alvin
  • RoninZA
    New Member
    • Jul 2007
    • 78

    #2
    Originally posted by Maidenz08
    Hi,

    How do i make a http request in asp.net. I need to send an sms. I have an account with a provider. So all i have to do is do a http request like http://www.provider.co m/NUMBER=12345678 90&MSG=Test+Msg .

    I can do response.redire ct("http://www.provider.co m/NUMBER=12345678 90&MSG=Test+Msg " but it goes to another page out of my application.

    Regards,
    Alvin
    Try using the System.Web.HTTP Request object - you shouldbe able to wangle it as follows:

    System.Web.HTTP Request request = new System.Web.HTTP Request(string. Empty, "http://www.provider.co m/NUMBER=12345678 90&MSG=Test+Msg ", string.Empty);

    Hope it helps!

    Comment

    • Maidenz08
      New Member
      • Sep 2007
      • 31

      #3
      Originally posted by RoninZA
      Try using the System.Web.HTTP Request object - you shouldbe able to wangle it as follows:

      System.Web.HTTP Request request = new System.Web.HTTP Request(string. Empty, "http://www.provider.co m/NUMBER=12345678 90&MSG=Test+Msg ", string.Empty);

      Hope it helps!
      Thanks a lot.. It worked..

      Alvin

      Comment

      • talhaekram
        New Member
        • Apr 2007
        • 14

        #4
        HttpRequestResp onse objRequest = new HttpRequestResp onse("", "http://www.provider.co m/NUMBER=12345678 90&MSG=Test+Msg l");

        objRequest.PROX Y_PORT = 0;
        objRequest.HTTP _USER_NAME = "...";
        objRequest.HTTP _USER_PASSWORD = "...";
        objRequest.PROX Y_SERVER = "...";

        objRequest.Send Request();

        Comment

        Working...