This week's book giveaway is in the General Computing forum. We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line! See this thread for details.
Generally, the request for the web server will be generated by the browser in the normal web application. When the user type in the url, the browser will convert it to HTTP request and send it to the webserver by identifying the port 80.
I want to know whether it's possible to generate the request, what the browser is generating and able send it to the web server manually.? If so, can the web server able to identify whether this request has been generated by browser or other. How can I generate the request manually and send it to the webserver?
YES it is possible to generate the request and to send it to the server manually. I don't think that the server is able to identify that the request is from browser or something else because i think that all HTTP request format is same and it is already defined by some community.
You can use some already available libraries to generate http request. I will suggest you to make use of Apache HTTP client web page for this. It is easy to use and keeps all the low level details to itself. [ December 03, 2008: Message edited by: Himanshu Gupta ]
Originally posted by himanshu gupta I don't think that the server is able to identify that the request is from browser or something else because i think that all HTTP request format is same and it is already defined by some community
The User-Agent header will let you identify the browser , its version even the client's os and its version.
The User-Agent header will let you identify the browser , its version even the client's os and its version.
Generally this is true, but a number of browsers let you manipulate this header, so you can't take its value for absolutely correct. Client libraries like HttpClient will send whatever the code tells them to send, so you can't be sure whether the user is a browser or a program by looking at this header.