pub fn request_params(
target: &dyn ReplayTarget,
request: &CompletionRequest,
base: impl FnOnce(&mut BaseInput<'_>) -> Result<Map<String, Value>, EncodeError>,
raw_at: RawAt,
rewrites: &[Rewrite],
) -> Result<FinalBody, EncodeError>Expand description
The body target sends for request. Reports each refused option
(after Completion::prepare none is left), then calls base for the
wire’s own encoding of the request, merges the mapped options, then the
provider options at the top level, then additional_params as raw_at
places them, and applies rewrites in order. The only reader of the
request’s options, provider options and additional_params on the
completion path.
§Errors
When an option or a provider field is refused under
OnUnsupported::Error, the request carries provider options that did
not serialize,
additional_params is not an object or holds a malformed tools or
cached-content handle, base fails, or a rewrite refuses the body.