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

org.jsoftware.restclient.RestClient Maven / Gradle / Ivy

There is a newer version: 1.5
Show newest version
package org.jsoftware.restclient;

import java.net.MalformedURLException;
import java.util.List;

/**
 * @author szalik
  */
public interface RestClient extends AutoCloseable {

    /**
     * @param plugins plugins to be used
     */
    void setPlugins(List plugins);

    /**
     * @return list of enabled plugins
     */
    List getPlugins();

    /**
     * Prepare GET request
     * @param url url
     * @return request builder
     * @throws MalformedURLException if url is not well formatted.
     */
    RestClientCall get(String url) throws MalformedURLException;


    /**
     * Prepare HEAD request
     * @param url url
     * @return request builder
     * @throws MalformedURLException if url is not well formatted.
     */
    RestClientCall head(String url) throws MalformedURLException;


    /**
     * Prepare OPTIONS request
     * @param url url
     * @return request builder
     * @throws MalformedURLException if url is not well formatted.
     */
    RestClientCall options(String url) throws MalformedURLException;


    /**
     * Prepare DELETE request
     * @param url url
     * @return request builder
     * @throws MalformedURLException if url is not well formatted.
     */
    RestClientCall delete(String url) throws MalformedURLException;


    /**
     * Prepare POST request
     * @param url url
     * @return request builder
     * @throws MalformedURLException if url is not well formatted.
     */
    RestClientDataCall post(String url) throws MalformedURLException;


    /**
     * Prepare PUT request
     * @param url url
     * @return request builder
     * @throws MalformedURLException if url is not well formatted.
     */
    RestClientDataCall put(String url) throws MalformedURLException;


}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy