RequestOptions¶
Builder options available for all HTTP request methods.
Provides methods for setting headers, query parameters, and authentication.
Use build() to produce the final HTTPRequest val.
Methods that accept a body (POST, PUT, PATCH, DELETE, OPTIONS) return
RequestOptionsWithBody instead, which extends this interface with
body-setting methods.
Public Functions¶
header¶
Add a header to the request.
Parameters¶
Returns¶
- RequestOptions ref
query¶
Add a query parameter. Parameters are percent-encoded in build().
Parameters¶
Returns¶
- RequestOptions ref
basic_auth¶
Set the Authorization header using HTTP Basic authentication.
Parameters¶
Returns¶
- RequestOptions ref
bearer_auth¶
Set the Authorization header using a Bearer token.
Parameters¶
- token: String val
Returns¶
- RequestOptions ref
build¶
Build the final HTTPRequest val.
Returns¶
- HTTPRequest val