
net.eusashead.parquet.http.container.TraceHandler Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of parquet-web Show documentation
Show all versions of parquet-web Show documentation
Parquet is a Java REST framework built on Yoke and Vert.x
The newest version!
package net.eusashead.parquet.http.container;
import io.netty.handler.codec.http.HttpHeaders;
import net.eusashead.parquet.http.HttpStatus;
import org.vertx.java.core.Handler;
import com.jetdrone.vertx.yoke.middleware.YokeRequest;
public class TraceHandler implements Handler {
@Override
public void handle(YokeRequest request) {
StringBuilder body = new StringBuilder();
for (String header : request.headers().names()) {
body.append(header + ": " + request.headers().get(header) + "\r\n");
}
request.response().headers().set(HttpHeaders.Names.CONTENT_TYPE, "message/http; charset=utf-8");
request.response().setStatusCode(HttpStatus.OK.getCode()).end(body.toString());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy