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

de.bytefish.fcmjava.client.interceptors.request.JsonRequestInterceptor Maven / Gradle / Ivy

There is a newer version: 2.5
Show newest version
// 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