Package com.inrupt.client
Class Request.Builder
java.lang.Object
com.inrupt.client.Request.Builder
- Enclosing class:
- Request
A
Request builder.-
Method Summary
Modifier and TypeMethodDescriptionbuild()Build theRequest.DELETE()A convenience method for building an HTTP DELETE request.GET()A convenience method for building an HTTP GET request.HEAD()A convenience method for building an HTTP HEAD request.Set an individual header for this request.method(String method, Request.BodyPublisher publisher) Set the HTTP method for this request.PATCH(Request.BodyPublisher publisher) A convenience method for building an HTTP PATCH request with a body.POST(Request.BodyPublisher publisher) A convenience method for building an HTTP POST request with a body.PUT(Request.BodyPublisher publisher) A convenience method for building an HTTP PUT request with a body.Set an individual header for this request.Set a timeout value for this request.A convenience method for setting a Content-Type header.Set the URI for this request.
-
Method Details
-
uri
Set the URI for this request.- Parameters:
uri- the request URI- Returns:
- this builder
-
header
Set an individual header for this request.- Parameters:
name- the header namevalue- the header value- Returns:
- this builder
-
setHeader
Set an individual header for this request.This method will remove all existing headers defined for the provided name
- Parameters:
name- the header namevalue- the header value- Returns:
- this builder
-
method
Set the HTTP method for this request.- Parameters:
method- the HTTP request methodpublisher- the body publisher- Returns:
- this builder
-
timeout
Set a timeout value for this request.- Parameters:
timeout- the timeout value- Returns:
- this builder
-
type
A convenience method for setting a Content-Type header.- Parameters:
type- the content-type- Returns:
- this builder
-
GET
A convenience method for building an HTTP GET request.- Returns:
- this builder
-
POST
A convenience method for building an HTTP POST request with a body.- Parameters:
publisher- the body publisher- Returns:
- this builder
-
PUT
A convenience method for building an HTTP PUT request with a body.- Parameters:
publisher- the body publisher- Returns:
- this builder
-
PATCH
A convenience method for building an HTTP PATCH request with a body.- Parameters:
publisher- the body publisher- Returns:
- this builder
-
HEAD
A convenience method for building an HTTP HEAD request.- Returns:
- this builder
-
DELETE
A convenience method for building an HTTP DELETE request.- Returns:
- this builder
-
build
Build theRequest.- Returns:
- the request
-