Update Reqwest client to handle status filters
This change updates `ReqwestAdminServiceClient`'s `list_circuits` method
to handle a `circuit_status` filter.
@@ -84,8 +84,12 @@ impl AdminServiceClient for ReqwestAdminServiceClient {
fn list_circuits(&self, filter: Option<&str>) -> Result<CircuitListSlice, InternalError> {
let mut url = format!("{}/admin/circuits?limit={}", self.url, PAGING_LIMIT);
if let Some(filter) = filter {
+ if filter.starts_with("status") {
+ url = format!("{}&{}", &url, &filter);
+ } else {
url = format!("{}&filter={}", &url, &filter);
}
+ }
let request = Client::new()
.get(&url)
