
de.bytefish.fcmjava.client.interceptors.request.JsonRequestInterceptor Maven / Gradle / Ivy
// Copyright (c) Philipp Wagner. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
package de.bytefish.fcmjava.client.interceptors.request;
import org.apache.http.HttpException;
import org.apache.http.HttpHeaders;
import org.apache.http.HttpRequest;
import org.apache.http.HttpRequestInterceptor;
import org.apache.http.protocol.HttpContext;
import java.io.IOException;
public class JsonRequestInterceptor implements HttpRequestInterceptor {
@Override
public void process(HttpRequest httpRequest, HttpContext httpContext) throws HttpException, IOException {
httpRequest.setHeader(HttpHeaders.CONTENT_TYPE, "application/json");
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy