private void ProcessPOST(Exchange exchange) { String payload = exchange.Request.PayloadString; if (_test.request_short) { Assert.AreEqual(payload, SHORT_POST_REQUEST); } else { Assert.AreEqual(payload, LONG_POST_REQUEST); } Response response = new Response(StatusCode.Changed); if (_test.respond_short) { response.SetPayload(SHORT_POST_RESPONSE); } else { response.SetPayload(LONG_POST_RESPONSE); } exchange.SendResponse(response); }
private void ProcessGET(Exchange exchange) { Response response = new Response(StatusCode.Content); if (_test.respond_short) { response.SetPayload(SHORT_GET_RESPONSE); } else { response.SetPayload(LONG_GET_RESPONSE); } exchange.SendResponse(response); }
public void Respond(Int32 code, String message, Int32 mediaType) { Response response = new Response(code); if (null != message) { response.SetPayload(message, mediaType); } Respond(response); }