Exemplo n.º 1
0
 private static void PatchFile(IRequest request, string directory, IResponseBuilder responseBuilder)
 {
     File.WriteAllText(directory + request.Resource, request.Body);
     var hash = EncryptionTools.GetSha1(directory + request.Resource);
     responseBuilder.SetStatusCode(204);
     responseBuilder.AddHeader(Headers.ContentLocation, request.Resource);
     responseBuilder.AddHeader(Headers.ETag, hash);
 }