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

global.maplink.http.request.WithBodyRequest Maven / Gradle / Ivy

The newest version!
package global.maplink.http.request;

import lombok.Getter;

import java.net.URL;

public class WithBodyRequest extends Request {

    @Getter
    private final byte[] body;

    public WithBodyRequest(URL url, byte[] body) {
        super(url);
        this.body = body;
    }

    public WithBodyRequest(URL url, RequestBody body) {
        this(url, body.getBytes());
        this.withHeader("Content-Type", body.getContentType());
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy