public async Task <IActionResult> HeadAsync() { var urlBases = _urlBaseBuilder.Build(Request); var linkTemplates = _linkTemplatesBuilder.Build(urlBases); Response.Headers.Add(LinkTemplateHeader, linkTemplates); return(Ok()); }
public string Build <TItem>(IPage <TItem> page, HttpRequest request) { if (page == null) { throw new ArgumentNullException(nameof(page)); } if (request == null) { throw new ArgumentNullException(nameof(request)); } var urlBases = _urlBaseBuilder.Build(request); var links = _linksFormatter.GetLinks(urlBases.ReadUrl, page); return(links); }