Package de.presti.ree6.utils.external
Class RequestUtility.Request.RequestBuilder
java.lang.Object
de.presti.ree6.utils.external.RequestUtility.Request.RequestBuilder
- Enclosing class:
- RequestUtility.Request
Builder class for a Request class.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbearerAuth
(String bearerAuth) Change the Bearer Auth Token.bodyPublisher
(HttpRequest.BodyPublisher bodyPublisher) Change the Body publisher used.build()
Build the Request.GET()
Change the Request method to GET.Change the Headers.method
(RequestUtility.Method method) Change the Request method.POST()
Change the Request method to POST.PUT()
Change the Request method to PUT.Change the Url of the Request.
-
Constructor Details
-
RequestBuilder
public RequestBuilder()
-
-
Method Details
-
url
Change the Url of the Request.- Parameters:
url
- the new Url.- Returns:
- the Request.
-
bearerAuth
Change the Bearer Auth Token.- Parameters:
bearerAuth
- the new Auth Token.- Returns:
- the Request.
-
method
Change the Request method.- Parameters:
method
- the new Method.- Returns:
- the Request.
-
GET
Change the Request method to GET.- Returns:
- the RequestBuilder.
-
POST
Change the Request method to POST.- Returns:
- the RequestBuilder.
-
PUT
Change the Request method to PUT.- Returns:
- the RequestBuilder.
-
bodyPublisher
Change the Body publisher used.- Parameters:
bodyPublisher
- the Body Publisher used for PUT and POST Requests.- Returns:
- the Request.
-
header
Change the Headers.- Parameters:
header
- the new Header.- Returns:
- the Request.
-
build
Build the Request.- Returns:
- the Request.
-