public string post_header_values(HeaderInput input) { if (input.Value1.IsNotEmpty()) { _writer.AppendHeader(input.Key, input.Value1); } if (input.Value2.IsNotEmpty()) { _writer.AppendHeader(input.Key, input.Value2); } return("it's all good"); }
public HtmlDocument get_doughnut_cached() { _writer.AppendHeader(HttpResponseHeader.ETag, Guid.NewGuid().ToString()); _document.Add(new LiteralTag(_document.Partial <DateRequest>().ToString())); return(_document); }
private string invokeWrapped(Type requestType, string categoryOrHttpMethod = null) { var chain = _resolver.FindUniqueByType(requestType, category: categoryOrHttpMethod ?? Categories.VIEW); var partial = _factory.BuildPartial(chain); var output = _writer.Record(partial.InvokePartial); output.Headers().Each(x => _writer.AppendHeader(x.Name, x.Value)); return(output.GetText()); }
private void processAssetFiles(AssetPath path, IEnumerable <AssetFile> files) { string etag = _eTagGenerator.Create(files); _cache.LinkFilesToResource(path.ResourceHash, files); _output.AppendHeader(HttpResponseHeader.ETag, etag); if (!FubuMode.InDevelopment()) { _cachingHeaders.HeadersFor(files).Each(x => x.Write(_output)); } }
protected override DoNext performInvoke() { var context = request.Get <ContextInputModel>(); var apiKey = context.Headers["apikey"]; //for now assume that an api call always means that the request is coming from a launchpad if (apiKey != null && context.Url.ToLower() != "/commands") { if (session.Query <LaunchPadCommand>().Any(c => !c.Delivered)) { writer.AppendHeader("watchr.commandsavailable", "true"); } } return(DoNext.Continue); }
public void Write(IOutputWriter writer) { writer.AppendHeader(Name, Value); }
public static void ContentType(this IOutputWriter writer, MimeType mimeType) { writer.AppendHeader(HttpResponseHeader.ContentType, mimeType.Value); }
public static void AppendHeader(this IOutputWriter writer, HttpResponseHeader header, string value) { writer.AppendHeader(HttpResponseHeaders.HeaderNameFor(header), value); }
public string get_response_headers() { _writer.AppendHeader("x-1", "a"); _writer.AppendHeader("x-2", "b"); _writer.AppendHeader(HttpResponseHeaders.KeepAlive, true.ToString()); _writer.AppendHeader(HttpResponseHeaders.Server, "Server1"); return("Nothing to see here"); }
public void Correlate() { _headers.Value <string>(Correlation_Id, id => _writer.AppendHeader(Correlation_Id, id)); }
public void Write(IOutputWriter writer) { writer.AppendHeader(Name, Value); }