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

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

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

import org.apache.http.entity.ContentType;

import java.io.InputStream;

/**
 * Request builder for POST and PUT http methods.
 * @author szalik
 */
public interface RestClientDataCall extends BaseRestClientCall {

    /**
     * Set parameters encoding
     * @param charset charse for encoding post and put parameters
     * @return self
     * @see BaseRestClientCall#parameter(String, Object)
     */
    RestClientDataCall parametersEncoding(String charset);

    /**
     * Set request body
     * @param inputStream body
     * @param contentType body content-type
     * @return self
     */
    RestClientDataCall body(InputStream inputStream, ContentType contentType);

    /**
     * Set request body
     * @param data body
     * @param contentType body content-type
     * @return self
     */
    RestClientDataCall body(byte[] data, ContentType contentType);

    /**
     * Set request body
     * @param data body
     * @param contentType body content-type
     * @return self
     */
    RestClientDataCall body(String data, ContentType contentType);

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy