[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

HTTP GET/POST

Posted on 2008-06-20
4
Medium Priority
?
301 Views
Last Modified: 2013-11-26
I need to code a http post to request something from a remote server and receive a response. I simply want to integrate sms functioality into my website. I have an account set up with the company at the following website and all I want to do is plug into their sms functionality.

This is the website
http://www.smsglobal.com.au/api/http.html
Can anyone give me some clues on where to start? I am developing using VB and visual Studio 2008,

I just want an ascx and aspx that would connect to the above service.

0
Comment
Question by:JOHNFROG
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 2

Expert Comment

by:balochdude
ID: 21832001
Use WebRequest or WebResponse.

      Dim objWebRequest As WebRequest = WebRequest.Create(strURL)
      Dim objWebResponse As WebResponse = objWebRequest.GetResponse()
      Dim objStream As Stream = objWebResponse.GetResponseStream()
      Dim objStreamReader As StreamReader = New StreamReader(objStream)
      Dim strHTML As String = objStreamReader.ReadToEnd
0
 
LVL 2

Expert Comment

by:balochdude
ID: 21832029
Use WebRequest AND WebResponse

-- OR --

Use HTTPWebRequest
0
 
LVL 2

Accepted Solution

by:
balochdude earned 1500 total points
ID: 21832109
HTTPWebRequest Example:

Its not the complete code but it will give you some idea (and its not tested code):

Dim smsRequest as HttpWebRequest = WebRequest.Create("http://www.smsglobal.com.au.http-api.php?action=ACTION&user=USERNAME&
password=SECRET&from=FROMNUMBER&to=61409317436&text=Hello%20world");
smsRequest.Method = "POST"
smsRequest.ContentType="application/x-www-form-urlencoded"
Dim st as Stream = smsRequest.GetRequestStream()
' Send data with st and close st
0
 

Author Comment

by:JOHNFROG
ID: 21836231
Nice one. Actually I took that and then found
http://www.asp101.com/samples/http_post_aspx.asp which I would thoroughly recommend to anyone foloowing the solution.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question