Things that I found useful in trying to pass Cob Spec
- Understand what HTTP Request and Response looks like
- The only requirement you need for response is the first line (HTTP/1.1 200 OK)
- There is a line break between the header and the body
- You can debug your server with Cob Spec
- Run your server in Debugger (Right click in your IDE, select Debug)
- Put on your breakpoint
- Run your cobspec test. It should stop where your breakpoint is.
- You can use this method to print out the request Cobspec is sending
- Reading client request
- I use BufferReader to read my request
- To check the end of a header, I check to see if the line is null or empty string ("")
0 comments:
Post a Comment