Hello JavaForums,
I'm currently working on an http java api, and yes I know one already exists. That being said, I'm running into problems where the network is timing out. I've never directly written HTTP methods before, so I believe the problem lies within my GET request and not in the java code itself.
Here is the console information:
Java Code:
[http.TCPClient]: connecting to - [128.30.52.37, 80]
[http.TCPClient]: Connection established.
[http.TCPClient]: Listener running.
[http.TCPClient]: sent:
GET /Protocols/HTTP/HTRQ_Headers.html HTTP/1.0
Accept: text/html
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_1) AppleWebKit/537.73.11 (KHTML, like Gecko) Version/7.0.1 Safari/537.73.11
[Recieved Packet | Lines = 8]
HTTP/1.0 408 Request Time-out
Cache-Control: no-cache
Connection: close
Content-Type: text/html
<html><body><h1>408 Request Time-out</h1>
Your browser didn't send a complete request in time.
</body></html>
For some reason the server is taking way too long to reply. It usually takes around 10 or 15 seconds to get a response. Again I believe the error is in my GET request, but it's been a while since I've needed to write a TCP client, so if anyone wants the code I can submit parts of it as well.
No comments:
Post a Comment