Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Send a HTTP request

Posted on 1999-07-11
3
Medium Priority
?
317 Views
Last Modified: 2010-04-16
0
Comment
Question by:kavas
[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 Comments
 

Accepted Solution

by:
israel022697 earned 600 total points
ID: 1245723

URL url = new URL("http://www.gosms.co.il/cgi/smsg.exe?&target=318209&mesg=Another+test+message&imageField.x=34&imageField.y=11" );

//Disable cache
url.openConnection().setDefaultUseCaches( false );
            
DataInputStream dis = new DataInputStream( url.openStream() );
                  
// Read response
sReply = dis.readLine();


0
 

Expert Comment

by:jsabesan
ID: 1245724
Try this :

You can get the response also :
try{
                                                  
URL url=new URL"http://www.gosms.co.il/cgi/smsg.exe?&target=318209&mesg=Another+test+message&imageField.x=34&imageField.y=11");
                                                                                              BufferedReader in=new BufferedReader(new InputStreamReader(url.openStream()));
                                                  while((str=in.readLine())!=null)
{
                                                      sb.append(str);
                                                      
                                                        
}
                                                  
                                                  in.close();
      }
                                            catch(Exception e2){
                                                  System.out.println("Error  "+e2);
}
0
 
LVL 1

Expert Comment

by:Moondancer
ID: 6827907
This question was awarded, but never cleared due to the JSP-500 errors of that time.  It was "stuck" against userID -1 versus the intended expert whom you awarded.  This corrects the problem and the expert will now receive these points; points verified.

Please click on your Member Profile and select "View Question History" to navigate through any open or locked questions you may have to update and finalize them.  Or if you are an EE Pro user, click the link below to select open items for your Member ID using Power Search:
http://www.experts-exchange.com/jsp/qPowerSearch.jsp.

This is the Community Support link, if help is needed, along with the link to All Topics which reflects many TAs recently added.

http://www.experts-exchange.com/jsp/qList.jsp?ta=commspt
http://www.experts-exchange.com/jsp/zonesAll.jsp
 
Thank you,
Moondancer
Moderator @ Experts Exchange
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
In this post we will learn different types of Android Layout and some basics of an Android App.
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
Suggested Courses

704 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