Closed wfchandler closed 1 month ago
why were you using
oxide api
?
@ahl it's more convenient that manually setting the url and auth headers for curl
. I think it's a nice feature, are we planning on removing it?
why were you using
oxide api
?@ahl it's more convenient that manually setting the url and auth headers for
curl
. I think it's a nice feature, are we planning on removing it?
Not planning on removing it and it's intended to be more convenient than curl... but my hope is that it's rarely needed. May I ask what you were using it for?
In this case I was using it to print large amounts of text from the CLI to validate that the fix in #746 was working correctly.
I also used it recently for adding a silo cert in the context of https://github.com/oxidecomputer/docs/pull/398.
We read string values into a
serde_json::Value::String
when parsing parameters, using itsDisplay
format when appending{key}={value}
to the URI. This is incorrect asValue::String
encloses the value with double quotes.Use the
as_str()
method to write string values to query parameters.Full URI before:
https://oxide.sys.example.com/v1/instances?project=\"will\"
Full URI after:
https://oxide.sys.example.com/v1/instances?project=will
Also, currently we only check for params added via
-f/--raw-field
and-F/field
whenself.input
is not empty. It is valid to pass parameters when no body has been set, check for params independently of input.