package com.getbubblenow.android.api.interceptor;

import java.io.IOException;

import okhttp3.Interceptor;
import okhttp3.Request;
import okhttp3.Response;

import androidx.annotation.NonNull;

public class AcceptInterceptor implements Interceptor {
    private static final String ACCEPT_KEY = "Content-Type";
    private static final String ACCEPT_HEADER = "application/json";

    @Override
    @NonNull
    public Response intercept(final Chain chain) throws IOException {
        final Request original = chain.request();
        final Request.Builder builder = original.newBuilder().header(ACCEPT_KEY, ACCEPT_HEADER);
        final Request request = builder.build();
        return chain.proceed(request);
    }
}
