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 HeaderBilder class can be used.

Example:

request.SendAsyncGetResponse(
    /* 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.

ThreadingHelper

The class ThreadingHelper bridges between the endpoint thread and the unity main rendering thread. See Multithreading for more information.