Skip to content

Commit 726b2cf

Browse files
committed
Handle query parameters for webhook requests
1 parent 2eed823 commit 726b2cf

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/http/client.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4642,6 +4642,11 @@ impl Http {
46424642
let url = Url::parse(url).map_err(HttpError::Url)?;
46434643
let (webhook_id, token) =
46444644
crate::utils::parse_webhook(&url).ok_or(HttpError::InvalidWebhook)?;
4645+
let mut params = url.query_pairs().collect::<Vec<(&str, String)>>();
4646+
let params = match params.len() {
4647+
0 => None,
4648+
_ => Some(params),
4649+
};
46454650
self.fire(Request {
46464651
body: None,
46474652
multipart: None,
@@ -4651,7 +4656,7 @@ impl Http {
46514656
webhook_id,
46524657
token,
46534658
},
4654-
params: None,
4659+
params,
46554660
})
46564661
.await
46574662
}

0 commit comments

Comments
 (0)