de.qytera.qtaf.http.RequestBuilder Maven / Gradle / Ivy
The newest version!
// Generated by delombok at Wed Oct 09 13:14:47 UTC 2024
package de.qytera.qtaf.http;
import jakarta.ws.rs.client.Invocation;
import java.net.URI;
/**
* A wrapper around {@link Invocation.Builder} used for building HTTP requests. The wrap is needed so that the request
* path (e.g. https://example.org/a/b/c?d=f) remains exposed, which is very
* useful for error messages.
*
* Instances of {@link RequestBuilder} can be obtained using {@link WebService#buildRequest(URI)}.
*/
public class RequestBuilder {
/**
* The HTTP request's path (e.g. https://example.org/a/b.
*/
private final URI path;
/**
* The HTTP builder object, which can be used to specify request headers or the request's content type.
*/
private final Invocation.Builder builder;
/**
* The HTTP request's path (e.g. https://example.org/a/b.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public URI getPath() {
return this.path;
}
/**
* The HTTP builder object, which can be used to specify request headers or the request's content type.
*/
@java.lang.SuppressWarnings("all")
@lombok.Generated
public Invocation.Builder getBuilder() {
return this.builder;
}
@java.lang.SuppressWarnings("all")
@lombok.Generated
RequestBuilder(final URI path, final Invocation.Builder builder) {
this.path = path;
this.builder = builder;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy