Skip to content

Commit 71c6193

Browse files
committed
fix: update query_examples for http source
1 parent bcbbb62 commit 71c6193

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

src/sources/http_client/client.rs

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use snafu::ResultExt;
1010
use std::{collections::HashMap, time::Duration};
1111
use tokio_util::codec::Decoder as _;
1212

13-
use crate::http::QueryParameters;
13+
use crate::http::{QueryParameterValue, QueryParameters};
1414
use crate::sources::util::http_client;
1515
use crate::{
1616
codecs::{Decoder, DecodingConfig},
@@ -123,12 +123,19 @@ const fn default_http_method() -> HttpMethod {
123123
HttpMethod::Get
124124
}
125125

126-
fn query_examples() -> HashMap<String, Vec<String>> {
126+
fn query_examples() -> QueryParameters {
127127
HashMap::<_, _>::from_iter([
128-
("field".to_owned(), vec!["value".to_owned()]),
128+
(
129+
"field".to_owned(),
130+
QueryParameterValue::SingleParam("value".to_owned()),
131+
),
129132
(
130133
"fruit".to_owned(),
131-
vec!["mango".to_owned(), "papaya".to_owned(), "kiwi".to_owned()],
134+
QueryParameterValue::MultiParams(vec![
135+
"mango".to_owned(),
136+
"papaya".to_owned(),
137+
"kiwi".to_owned(),
138+
]),
132139
),
133140
])
134141
}

0 commit comments

Comments
 (0)