Reputation: 15
I am currently writing code to test an REST based API I am getting a status 404 error when trying to content to the server. Im pretty sure i have the correct username password base~Url and account
I dont know what to put in for useragent? I running a java program on my c drive to connect to the server. what type of info typically goes into the useragent field? Is it something to the with my browser.
Upvotes: 0
Views: 626
Reputation: 684
A 404 error can often mean there is a problem with the URI.
From: http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
The server has not found anything matching the Request-URI. No indication is given of whether the condition is temporary or permanent. The 410 (Gone) status code SHOULD be used if the server knows, through some internally configurable mechanism, that an old resource is permanently unavailable and has no forwarding address. This status code is commonly used when the server does not wish to reveal exactly why the request has been refused, or when no other response is applicable.
Upvotes: 1
Reputation: 55354
The version of Java you are running is the preferred User Agent. However, the server may restrict the User Agents to browsers to prevent remote access or site crawling.
For example:
Java/1.6.0_14
Upvotes: 0