Overview
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
define useful constants for Http Headers and Mime Types.