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

edu.ksu.canvas.net.RestClient Maven / Gradle / Ivy

The newest version!
package edu.ksu.canvas.net;

import edu.ksu.canvas.exception.InvalidOauthTokenException;
import edu.ksu.canvas.oauth.OauthToken;

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

import javax.validation.constraints.NotNull;

public interface RestClient {
    Response sendApiGet(@NotNull OauthToken token, @NotNull String url, int connectTimeout, int readTimeout) throws IOException;
    Response sendJsonPost(@NotNull OauthToken token, @NotNull String url, String json, int connectTimeout, int readTimeout) throws IOException;
    Response sendJsonPut(@NotNull OauthToken token, @NotNull String url, String json, int connectTimeout, int readTimeout) throws IOException;
    Response sendApiPost(@NotNull OauthToken token, @NotNull String url, Map> postParameters, int connectTimeout, int readTimeout) throws InvalidOauthTokenException, IOException;
    Response sendApiPostFile(@NotNull OauthToken token, @NotNull String url, Map> postParameters, String fileParameter, String filePath, InputStream is, int connectTimeout, int readTimeout) throws InvalidOauthTokenException, IOException;
    Response sendApiDelete(@NotNull OauthToken token, @NotNull String url, Map> deleteParameters, int connectTimeout, int readTimeout) throws InvalidOauthTokenException, IOException;
    Response sendApiPut(@NotNull OauthToken token, @NotNull String url, Map> putParameters, int connectTimeout, int readTimeout) throws InvalidOauthTokenException, IOException;

    String sendUpload(String uploadUrl, Map> params, InputStream in, String filename, int connectTimeout, int readTimeout) throws IOException;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy