All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.prometheus.metrics.exporter.common.PrometheusHttpResponse Maven / Gradle / Ivy

There is a newer version: 1.3.1
Show newest version
package io.prometheus.metrics.exporter.common;

import java.io.IOException;
import java.io.OutputStream;

public interface PrometheusHttpResponse {

    /**
     * See {@code jakarta.servlet.http.HttpServletResponse.setHeader(String, String)}
     */
    void setHeader(String name, String value);

    /**
     * This is equivalent to calling {@link com.sun.net.httpserver.HttpExchange#sendResponseHeaders(int, long)}
     * followed by {@link com.sun.net.httpserver.HttpExchange#getResponseBody()}.
     */
    OutputStream sendHeadersAndGetBody(int statusCode, int contentLength) throws IOException;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy