pub fn build_request_url(
base_url: &str,
base_path: &str,
method_binding: &HttpMethodBindingIr,
fields: &Value,
query: Option<&str>,
) -> Result<String, TransportError>Expand description
Build a fully-qualified URL by substituting path parameters and appending a
pre-encoded query string, returning TransportError on failure.
fields is expected to be a JSON object whose keys correspond to the
field names referenced by method_binding.field_bindings. Missing path
parameters yield TransportError::UrlBuild.
query is the already-encoded query string (no leading ?), produced by
crate::query::to_query_string. It arrives pre-encoded rather than as
structured data on purpose: the server decodes it with the same
serde_html_form codec, and routing it through this function’s own
serializer is what previously let the two ends disagree on Vec and nested
shapes.
§Errors
Returns TransportError::UrlBuild when a required path parameter is missing,
null, or empty, or when a referenced field is not convertible to a string.