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 post url connection not working 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 "post url connection not working " Watch "post url connection not working " New topic
Author

post url connection not working

sai sudhakar
Greenhorn

Joined: Mar 04, 2011
Posts: 4
I am providing the below given code. it is working well for POST TYPE=GET but not working for POST:: i need some help
Greg Charles
Sheriff

Joined: Oct 01, 2001
Posts: 2833
    
  11

How isn't it working? Is there an error message, bad response code, no response at all? It's possible that the server you're hitting just doesn't respond to POST requests to that URL.
sai sudhakar
Greenhorn

Joined: Mar 04, 2011
Posts: 4
i am getting a response code as 400 for request type POST
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19649
    
  18

That means Bad Request. That doesn't mean that POST is not supported; that would trigger a 405 error (Method Not Allowed). So something is wrong with the data you send.

I think this is beyond just I/O so I'll steal ( ) this thread away to our Sockets and Internet Protocols forum.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: post url connection not working
 
Similar Threads
HttpUrlConnection is not working
HttpUrlConnection is not working
Multiple posts over a secure connection
Problem with using HttpsURLConnection
HttpUrlConnection is not working