This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Sockets and Internet Protocols and the fly likes After which method java send real request to server? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "After which method java send real request to server?" Watch "After which method java send real request to server?" New topic
Author

After which method java send real request to server?

Ivan Franko
Ranch Hand

Joined: May 30, 2011
Posts: 44
for example, I have next java code:


And I cant understand, in which moment (after call what method) java send real request to the server?
Steve Luke
Bartender

Joined: Jan 28, 2003
Posts: 4165
    
  21

The connection / request isn't made until the connect() method is called. The connect() method is called implicitly in the getInputStream() method. So in your call the HTTP request is made when you call the getInputStream() method.


Steve
Ivan Franko
Ranch Hand

Joined: May 30, 2011
Posts: 44
Brilliant! Thank you!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: After which method java send real request to server?
 
Similar Threads
Java Network Question, pls help
What is difference between RequestDispatcher() and sendRedirect()?
Differences Between doGet(),doPost(),service()
Post Does not Return new Values
How to send the request and retrieve response