Useful Helpers

Header Builder

The RestRequest class contains methods which allow the caller to specify directly which headers are sent back to the caller. The argument is of type Dictionary<string, List<string>> headers. To ease the creation of this construct, the HeaderBilderclass can be used.


    /* httpCode */ 200, 
    /* headers */ new HeaderBuilder(HttpHeader.E_TAG, "").withHeader("2nd.header", ""), 
    /* content */ "OK");

HttpHeader and MimeType

HttpHeader and MimeType define useful constants for Http Headers and Mime Types.