public void Get(HttpResponseMessage resp, WebLinkCollection linkCollection) { resp.StatusCode = HttpStatusCode.NoContent; }
public string Get(HttpResponseMessage resp, WebLinkCollection webLinks) { webLinks.Links.Add(new WebLinkTarget(null, "http://someuri", "next")); resp.StatusCode = HttpStatusCode.OK; return "done"; }
private static void addLinkHeader(HttpResponseMessage httpResponse, WebLinkCollection linkCollection) { var links = linkCollection .Links .Aggregate(new StringBuilder(), (b, target) => b.Append(extractLinkDescription(target)).Append(',')) .RemoveLastCharacter() .ToString(); if (links.IsNullOrEmpty() == false) { httpResponse.Headers.AddWithoutValidation("Link", links); } }