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

com.absmartly.sdk.HTTPClient Maven / Gradle / Ivy

package com.absmartly.sdk;

import java.io.Closeable;
import java.util.Map;
import java8.util.concurrent.CompletableFuture;

import javax.annotation.Nonnull;
import javax.annotation.Nullable;

public interface HTTPClient extends Closeable {
	interface Response {
		int getStatusCode();

		String getStatusMessage();

		String getContentType();

		byte[] getContent();
	}

	CompletableFuture get(@Nonnull final String url, @Nullable final Map query,
			@Nullable final Map headers);

	CompletableFuture put(@Nonnull final String url, @Nullable final Map query,
			@Nullable final Map headers, @Nonnull final byte[] body);

	CompletableFuture post(@Nonnull final String url, @Nullable final Map query,
			@Nullable final Map headers, @Nonnull final byte[] body);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy