Class CoreHttpRequest.Builder
java.lang.Object
com.couchbase.client.core.endpoint.http.CoreHttpRequest.Builder
- Enclosing class:
- CoreHttpRequest
Builder for dynamic HTTP requests
-
Constructor Summary
ConstructorDescriptionBuilder
(CoreCommonOptions options, CoreContext coreContext, RequestTarget target, com.couchbase.client.core.deps.io.netty.handler.codec.http.HttpMethod method, CoreHttpPath path) -
Method Summary
Modifier and TypeMethodDescriptionbuild()
bypassExceptionTranslation
(boolean bypass) If true, a non-2xx HTTP status codes is always reported as anHttpStatusCodeException
.content
(byte[] content, CharSequence contentType) form
(UrlQueryStringBuilder formData) header
(CharSequence name, Object value) idempotent
(boolean idempotent) json
(byte[] content) static UrlQueryStringBuilder
newForm()
static UrlQueryStringBuilder
queryString
(UrlQueryStringBuilder queryString) queryString
(String preEncodedQueryString) trace
(String spanName, Consumer<RequestSpan> attributeSetter) traceBucket
(String bucketName) traceCollection
(String collectionName) traceScope
(String scopeName)
-
Constructor Details
-
Builder
public Builder(CoreCommonOptions options, CoreContext coreContext, RequestTarget target, com.couchbase.client.core.deps.io.netty.handler.codec.http.HttpMethod method, CoreHttpPath path)
-
-
Method Details
-
newForm
-
newQueryString
-
trace
- Parameters:
spanName
- (nullable)
-
trace
public CoreHttpRequest.Builder trace(@Nullable String spanName, @Nullable Consumer<RequestSpan> attributeSetter) -
traceAttr
-
traceBucket
-
traceScope
-
traceCollection
-
header
-
idempotent
-
queryString
-
queryString
-
bypassExceptionTranslation
If true, a non-2xx HTTP status codes is always reported as anHttpStatusCodeException
. If false, the message handler may throw a domain-specific exception instead.Defaults to false.
-
form
-
json
-
content
-
build
-
exec
-