Construct a new builder from an existing options object, if provided.
NOTE: server, auth, headers, and parameters are cloned, but data is left alone and assumed to be mutable autside of the builder or elsewhere.
Optionaloptions: OnmsHTTPOptionsA parameter to add or append to the request.
If undefined is passed, that parameter will be reset to defaults.
If the value is a string array, the existing value in the builder will be replaced.
Otherwise, if the parameter already exists in the builder, the parameter will be converted to an array
if necessary and this parameter will be added to it.
the parameter name
Optionalvalue: string | number | boolean | string[]the value of the parameter to add (or undefined)
Build the [[OnmsHTTPOptions]] object.
Merge the contents of the provided [[OnmsHTTPOptions]] object, additively. Timeout, server, auth, and data will be replaced only if set, and headers and parameters will be overlayed on top of existing.
Optionaloptions: OnmsHTTPOptionsthe options to merge with this builder's current values
The authentication config to use when connecting.
If undefined is passed, the default authentication settings will be used.
Optionalauth: OnmsAuthConfigthe authentication config
The data to use in the request.
If undefined is passed, the data will be cleared.
Optionaldata: anythe data
A header to set in the request only if it is not already set.
the header name
the value of the header
A header to set in the request.
If undefined is passed, that header will be reset to defaults.
the header name
Optionalvalue: string | number | booleanthe value of the header
The headers to set in the request.
If undefined is passed, all headers in the builder will be reset and the default headers will be used.
Optionalheaders: IHash<string>the headers to use (or undefined)
The parameters to pass to the request.
If undefined is passed, all parameters in the builder will be reset.
Optionalparameters: IHash<string | string[]>the parameters to use (or undefined)
The [[OnmsServer]] to connect to.
If undefined is passed, the default server will be used.
Optionalserver: OnmsServerthe new server
The connection timeout for the request.
If undefined is passed, the default timeout will be used.
Optionaltimeout: numberthe new timeout
A builder for [[OnmsHTTPOptions]]. Create a new one with [[OnmsHTTPOptions.newBuilder]].