Wednesday, September 4, 2013

Tips for Cob Spec

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

0 comments:

Post a Comment