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

com.lob.net.APIResource Maven / Gradle / Ivy

package com.lob.net;

import com.lob.exception.APIException;
import com.lob.exception.AuthenticationException;
import com.lob.exception.InvalidRequestException;
import com.lob.exception.RateLimitException;

import java.io.IOException;
import java.util.Map;

public abstract class APIResource  {

    private static ResponseGetter responseGetter = new ResponseGetter();

    public static final String CHARSET = "UTF-8";

    public enum RequestMethod {
        GET, POST, DELETE
    }

    public enum RequestType {
        NORMAL, MULTIPART
    }

    public static  LobResponse request(APIResource.RequestMethod method, APIResource.RequestType type,
                                  String url, Map params, Class clazz,
                                  RequestOptions options) throws AuthenticationException, APIException, RateLimitException, InvalidRequestException, IOException {
        return responseGetter.request(method, url, params, clazz, type, options);
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy