wyyerd / stripe-rs

Rust API bindings for the Stripe HTTP API.
Apache License 2.0
224 stars 88 forks source link

Fix `List::get_next` #106

Closed dthul closed 4 years ago

dthul commented 4 years ago

This should fix #105.

It's only a quick and dirty fix though. I feel that properly parsing the URL might be a more robust option (as the already existing TODO comment suggests).

stearnsc commented 4 years ago

Any reason to not just change the url fn to something like

        format!("{}/{}", self.host, path.trim_start_matches('/'))

?

that removes the "paths must start with a slash" invariant, and has the additional benefit of not breaking if we ever got to v10+

dthul commented 4 years ago

That would also work I guess. Do you want to create the fix or should I modify this PR?

stearnsc commented 4 years ago

I'll get it - https://github.com/wyyerd/stripe-rs/pull/120