Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6205025
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T05:11:56+00:00 2026-05-24T05:11:56+00:00

How can one pass http get or post methods to a windows application? I

  • 0

How can one pass http get or post methods to a windows application? I require a webserver to send a get method to my windows form application that will query a database then reply back to a webserver

I’m developing a windows based search engine that searches a MySQL database. It receives a keyword from an SMS gateway software as a HTTP get request and should reply to the gateway software using the same HTTP request.This is my code. It is correctly searching the database but I don’t know how to receive the get methods on the application however it’s sending the messages to SMS gateway.

Private Sub bSend_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles bSend.Click
    Dim request As HttpWebRequest
    Dim response As HttpWebResponse = Nothing
    Dim url As String
    Dim username As String = "admin"
    Dim password As String = "abc123"
    Dim host As String = "http://127.0.0.1:9501"
    Dim originator As String = "0724116972"

    Try

        url = host + "/api?action=sendmessage&" _
                 & "username=" & HttpUtility.UrlEncode(username) _
                 & "&password=" + HttpUtility.UrlEncode(password) _
                 & "&recipient=" + HttpUtility.UrlEncode(tbReceiver.Text) _
                 & "&messagetype=SMS:TEXT" _
                 & "&messagedata=" + HttpUtility.UrlEncode(tbMessage.Text) _
                 & "&originator=" + HttpUtility.UrlEncode(originator) _
                 & "&serviceprovider=" _
                 & "&responseformat=html"


        request = DirectCast(WebRequest.Create(url), HttpWebRequest)

        response = DirectCast(request.GetResponse(), HttpWebResponse)

        MessageBox.Show("Response: " & response.StatusDescription)

    Catch ex As Exception
        MessageBox.Show("Error. Server Not running")
        Me.Close()
    End Try
  End Sub
End Class
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T05:11:56+00:00Added an answer on May 24, 2026 at 5:11 am

    sounds like you want to host a webserver in your winforms application…you can use HttpListener – see http://msdn.microsoft.com/en-us/library/system.net.httplistener.aspx

    IF your application is not running as Administrator you will need to register the URL you are listerning to with netsh though

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can anyone help? I have a PHP method that sends an http post: <?php
Is it possible to post a form from one MVC site so that it
In one of my page, where it is a form with GET method, I
How can one pass command line arguments via file association in Vista 64? I
How to pass parameters to [WebMethod] in Asp.Net(C#) ? Can some one please explain
Simple task like make AJAX request , pass one parameter and return result, can
In a vxWorks Real-Time process, you can pass environment variables as one of the
Can some one tell me how to pass data from controller to a data
How do I pass a hidden field value from one application(html) page to GWT
I'm trying to pass two values to a function, so that i can check

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.