SOS SOS SOS PLEASE!!! I have created a primitive HttpServer in java which listens on port 80 and Uses Get method to open a file etc (127.0.0.1/index.html). ow i want create request headers (Accept,Accept Language,User-Agent) and response headers (Content-Length and Cache-Control) from HTTP/1.1 (RFC 2616) protocol. Can you help me how to do that...You will save my life!!!!!!!! Thanks!
Http-Server How to Create Request-Headers and response-Headers
2.7k Views Asked by Spyros At
1
There are 1 best solutions below
Related Questions in JAVA
- Add image to JCheckBoxMenuItem
- How to access invisible Unordered List element with Selenium WebDriver using Java
- Inheritance in Java, apparent type vs actual type
- Java catch the ball Game
- Access objects variable & method by name
- GridBagLayout is displaying JTextField and JTextArea as short, vertical lines
- Perform a task each interval
- Compound classes stored in an array are not accessible in selenium java
- How to avoid concurrent access to a resource?
- Why does processing goes slower on implementing try catch block in java?
- Redirect inside java interceptor
- Push toolbar content below statusbar
- Animation in Java on top of JPanel
- JPA - How to query with a LIKE operator in combination with an AttributeConverter
- Java Assign a Value to an array cell
Related Questions in HTTP-HEADERS
- Disable Expect: 100 Continue in Play
- Data in mysql is set to 0 when send a POST using network tab, codeigniter
- Create HTTP GET Header Request
- write a parsed response from a json file in a div
- Adding HTTP Header to AJAX get request
- Play Framework: How to Add a Header to Every Response
- Can servers use http headers order to catch a browser signature?
- how use data like that to send request from windows phone
- CURL to POSTMAN
- How to get content from another website using JQ or JS
- Python, Flask: How to set response header for all responses
- Best practice for indicating a client side refresh/warning from server side
- Gather Client Domain from Rails API GET Request
- How to remove HTTP Server "Apache"?
- AngularJS header authorization format in Interceptor
Related Questions in HTTPSERVER
- HTTP Server in iOS to list files Documents directory
- How to add http server to eclipse server runtime environments?
- Simple https web server as command line application for Mac in objective C
- Running an Http Server in Background in iOS
- Get request body from node.js's http.IncomingMessage
- Strange behavior after relaunching an iOS app after termination
- When should I include Content-Disposition header in a Partial-Content HTTP response?
- not found using http-server node.js
- Java - HttpServer not serving images
- HTTP GET server in C, long waiting (TTFB)
- Java HttpsServer class - support for multiple protocols?
- Simple-Web-Server crashes on probably wrongly catched exception
- Allow TIdHTTPServer to be accessed only from one client
- Java httpServer basic authentication for different request methods
- Java basic httpserver using apache httpcompoments
Related Questions in REQUEST-HEADERS
- Python - Read headers inside controller?
- How do I execute an ajax post with request header in Angular
- angular-file-upload provisional headers are not sent in IE browser
- httpChannel.setRequestHeader with httpChannel.redirectTo
- Android : my android app is not sending request header
- Request Headers not passing in production
- Rails + Passenger + Nginx error Request Origin (domainname.com) does not match Request Base_url (IP Address)
- Mocking Request Header module using Jest
- Unknown authorization header - Error 401
- Kubernetes cronJob to call REST API using CURL with headers is failing with curl(6) : could not resolve host
- Post with HttpClient and custom Accept / Encoding headers
- Require request header for asp.net core webapi
- Using requests.Session() for cookies with custom headers
- Submit File from HttpClient Angular to API-Rest CodeIgniter 3
- PHP Setting custom header starting with ':'
Related Questions in RFC2616
- Is using the If-Modified-Since header to filter a resource collection to only recent ones in a REST API considered a valid approach?
- Can I separate ALL HTTP headers with a comma? Even Authorization?
- Under what conditions are HTTP request headers removed by proxies?
- Embedded HTTPS server. How should redirection be handled, and should I offer HTTP?
- Error code for an invalid POST parameter
- what is the exact syntax and semantics of a quoted string in the http1.1 rfc2616
- Use of Accept-charset HTTP header
- What is the meaning of "contain an entity which describes the status of the request and refers to the new resource" in the HTTP/1.1 spec?
- HTTP/1.1 response to multiple range
- Reading http packets under linux
- Hyperlinks in the body of a 303 response
- http: minimum content-encoding support for clients?
- Send post body after process response headers with libcurl
- Trusting content type from a client
- Format date with Elixir DateTime to RFC2616 format
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Headers are just lines following initial GET/POST/* operation. Last header is separated from the content by an empty line. So all you need to do (both on the client and server sides) is to write a few lines into the request/response before the content.
P.S. Java has a built-in HTTP server, did you know that?
com.sun.net.HttpServer: