
net.dongliu.cute.http.body.Body Maven / Gradle / Ivy
The newest version!
package net.dongliu.cute.http.body;
import net.dongliu.cute.http.ContentType;
import java.net.http.HttpRequest.BodyPublisher;
/**
* A http request body.
*
* @param the body content type
*/
public interface Body {
/**
* Return the body data.
*
* @return the body
*/
T body();
/**
* The content type.
*
* @return the content type
*/
ContentType contentType();
/**
* Given a charset, return a new body Publisher for sending request body.
*
* @return the Body Publisher
*/
BodyPublisher asBodyPublisher();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy