wyyerd/stripe-rs

List::next() does not seem to work

dthul opened this issue · 1 comments

dthul commented

It seems like List::next() constructs an invalid URL.

When I try to get all active subscriptions using Subscriptions::list, the first request hits https://api.stripe.com/v1/subscriptions and succeeds. When I try to get the next page of results using List::next, the URL becomes https://api.stripe.com/v1/ubscriptions (note the missing "s").
The culprit seems to be the combination of Client::url:

format!("{}/{}", self.host, &path[1..])

which removes the first character from the path (because it expects the path to start with a slash), but List::get_next:
let mut url = url.trim_start_matches("/v1/").to_string();

already removed the slash.

resolved by #120