private-attribution / ipa

A raw implementation of Interoperable Private Attribution
MIT License
39 stars 23 forks source link

Create query should use body to pass query params #1149

Open akoshelev opened 1 month ago

akoshelev commented 1 month ago

Run into several issues trying to help @bmcase get the DP params in. Encoding params into URL works for very simple cases where it is just (key, value) pair. For more complex stuff like newtype enum, its just not possible to do in a nice and concise way.

We should just encode the params object into a JSON and pass it through HTTP body

@cberkhoff suggested that when working on upgrading our dependencies and I think now we have a valid case to do that. Maybe we don't need to stop using URL everywhere, for step stuff it is fine, but create query needs to change.

bmcase commented 3 weeks ago

Ideally, we'd have clap parse a complex enum such as

   #[cfg_attr(feature = "clap", arg(long, default_value = "WithDp{3.0}"))]
   pub dp_params: DpParams,

but have not found any way for this to work. Nice thing to revisit if we are reworking query params overall. Several pasted things tried here (doc, branch)