ratpack.http.MutableHeaders Java Examples
The following examples show how to use
ratpack.http.MutableHeaders.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ZipkinHttpClientImpl.java From ratpack-zipkin with Apache License 2.0 | 5 votes |
@Inject public ZipkinHttpClientImpl(final HttpClient delegate, final HttpTracing httpTracing) { this.delegate = delegate; this.threadLocalSpan = ThreadLocalSpan.create(httpTracing.tracing().tracer()); this.currentTraceContext = httpTracing.tracing().currentTraceContext(); this.nextThreadLocalSpan = new NextSpan(threadLocalSpan, httpTracing.clientSampler()); this.handler = HttpClientHandler.create(httpTracing, ADAPTER); this.injector = httpTracing.tracing().propagation().injector(MutableHeaders::set); }
Example #2
Source File: HeaderHandler.java From FrameworkBenchmarks with BSD 3-Clause "New" or "Revised" License | 5 votes |
@Override public void handle(Context ctx) { MutableHeaders headers = ctx.getResponse().getHeaders(); headers.set(HttpHeaderNames.DATE, dateHelper.getDate()); headers.set(SERVER, RATPACK); ctx.next(); }
Example #3
Source File: ZipkinHttpClientImpl.java From ratpack-zipkin with Apache License 2.0 | 4 votes |
@Override public MutableHeaders getHeaders() { return this.delegate.getHeaders(); }
Example #4
Source File: ZipkinHttpClientImpl.java From ratpack-zipkin with Apache License 2.0 | 4 votes |
@Override public RequestSpec headers(Action<? super MutableHeaders> action) throws Exception { this.delegate.headers(action); return this; }
Example #5
Source File: RequestValidatorFilter.java From tutorials with MIT License | 4 votes |
@Override public void handle(Context ctx) throws Exception { MutableHeaders headers = ctx.getResponse().getHeaders(); headers.set("Access-Control-Allow-Origin", "*"); ctx.next(); }