Skip to content

Commit 0ce1b24

Browse files
committed
chore(pact-matching): reqwest form requires the form feature enabled
1 parent 32436af commit 0ce1b24

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

rust/pact_matching/src/metrics.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ use std::str;
1111
use std::sync::Mutex;
1212

1313
use anyhow::anyhow;
14+
use itertools::Itertools;
1415
use lazy_static::lazy_static;
1516
use maplit::hashmap;
1617
use reqwest::Client;
@@ -200,7 +201,10 @@ pub async fn send_metrics_async(event: MetricEvent) {
200201
}
201202
};
202203
let result = client.post(GA_URL)
203-
.form(&event_payload)
204+
.header("content-type", "application/x-www-form-urlencoded")
205+
.body(event_payload.iter()
206+
.map(|(k, v)| format!("{}={}", k, v))
207+
.join("&"))
204208
.send()
205209
.await;
206210
if let Err(err) = result {

0 commit comments

Comments
 (0)