Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22397,7 +22397,9 @@ components:
$ref: "#/components/schemas/ConvertJobResultsToSignalsData"
type: object
CostAggregationType:
description: "Controls how costs are aggregated when using `start_date`. The `cumulative` option returns month-to-date running totals."
description: |-
Controls how costs are aggregated when using `start_date`.
The `cumulative` option returns month-to-date running totals.
enum:
- cumulative
type: string
Expand Down
18 changes: 18 additions & 0 deletions src/datadog/configuration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// Copyright 2019-Present Datadog, Inc.
use lazy_static::lazy_static;
use log::warn;
use reqwest::header::{HeaderMap, HeaderValue};
use std::collections::HashMap;
use std::env;

Expand Down Expand Up @@ -53,6 +54,7 @@ pub struct Configuration {
pub proxy_url: Option<String>,
pub enable_retry: bool,
pub max_retries: u32,
pub(crate) is_iac: bool,
}

impl Configuration {
Expand Down Expand Up @@ -117,6 +119,19 @@ impl Configuration {
self.enable_retry = enable_retry;
self.max_retries = max_retries;
}

pub fn set_is_iac(&mut self, is_iac: bool) {
self.is_iac = is_iac;
}

pub(crate) fn apply_headers(&self, builder: reqwest::ClientBuilder) -> reqwest::ClientBuilder {
if !self.is_iac {
return builder;
}
let mut default_headers = HeaderMap::new();
default_headers.insert(MANAGED_BY_HEADER_NAME, HeaderValue::from_static("iac"));
builder.default_headers(default_headers)
}
}

impl Default for Configuration {
Expand Down Expand Up @@ -974,10 +989,13 @@ impl Default for Configuration {
proxy_url: None,
enable_retry: false,
max_retries: 3,
is_iac: false,
}
}
}

pub(crate) const MANAGED_BY_HEADER_NAME: &str = "X-Datadog-Managed-By";

lazy_static! {
pub static ref DEFAULT_USER_AGENT: String = format!(
"datadog-api-client-rust/{} (rust {}; os {}; arch {})",
Expand Down
2 changes: 1 addition & 1 deletion src/datadogV1/api/api_authentication.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ impl AuthenticationAPI {
}
pub fn with_config(config: datadog::Configuration) -> Self {
let reqwest_client_builder = {
let builder = reqwest::Client::builder();
let builder = config.apply_headers(reqwest::Client::builder());
#[cfg(not(target_arch = "wasm32"))]
let builder = if let Some(proxy_url) = &config.proxy_url {
builder.proxy(reqwest::Proxy::all(proxy_url).expect("Failed to parse proxy URL"))
Expand Down
2 changes: 1 addition & 1 deletion src/datadogV1/api/api_aws_integration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ impl AWSIntegrationAPI {
}
pub fn with_config(config: datadog::Configuration) -> Self {
let reqwest_client_builder = {
let builder = reqwest::Client::builder();
let builder = config.apply_headers(reqwest::Client::builder());
#[cfg(not(target_arch = "wasm32"))]
let builder = if let Some(proxy_url) = &config.proxy_url {
builder.proxy(reqwest::Proxy::all(proxy_url).expect("Failed to parse proxy URL"))
Expand Down
2 changes: 1 addition & 1 deletion src/datadogV1/api/api_aws_logs_integration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ impl AWSLogsIntegrationAPI {
}
pub fn with_config(config: datadog::Configuration) -> Self {
let reqwest_client_builder = {
let builder = reqwest::Client::builder();
let builder = config.apply_headers(reqwest::Client::builder());
#[cfg(not(target_arch = "wasm32"))]
let builder = if let Some(proxy_url) = &config.proxy_url {
builder.proxy(reqwest::Proxy::all(proxy_url).expect("Failed to parse proxy URL"))
Expand Down
2 changes: 1 addition & 1 deletion src/datadogV1/api/api_azure_integration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ impl AzureIntegrationAPI {
}
pub fn with_config(config: datadog::Configuration) -> Self {
let reqwest_client_builder = {
let builder = reqwest::Client::builder();
let builder = config.apply_headers(reqwest::Client::builder());
#[cfg(not(target_arch = "wasm32"))]
let builder = if let Some(proxy_url) = &config.proxy_url {
builder.proxy(reqwest::Proxy::all(proxy_url).expect("Failed to parse proxy URL"))
Expand Down
2 changes: 1 addition & 1 deletion src/datadogV1/api/api_dashboard_lists.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ impl DashboardListsAPI {
}
pub fn with_config(config: datadog::Configuration) -> Self {
let reqwest_client_builder = {
let builder = reqwest::Client::builder();
let builder = config.apply_headers(reqwest::Client::builder());
#[cfg(not(target_arch = "wasm32"))]
let builder = if let Some(proxy_url) = &config.proxy_url {
builder.proxy(reqwest::Proxy::all(proxy_url).expect("Failed to parse proxy URL"))
Expand Down
2 changes: 1 addition & 1 deletion src/datadogV1/api/api_dashboards.rs
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ impl DashboardsAPI {
}
pub fn with_config(config: datadog::Configuration) -> Self {
let reqwest_client_builder = {
let builder = reqwest::Client::builder();
let builder = config.apply_headers(reqwest::Client::builder());
#[cfg(not(target_arch = "wasm32"))]
let builder = if let Some(proxy_url) = &config.proxy_url {
builder.proxy(reqwest::Proxy::all(proxy_url).expect("Failed to parse proxy URL"))
Expand Down
2 changes: 1 addition & 1 deletion src/datadogV1/api/api_downtimes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ impl DowntimesAPI {
}
pub fn with_config(config: datadog::Configuration) -> Self {
let reqwest_client_builder = {
let builder = reqwest::Client::builder();
let builder = config.apply_headers(reqwest::Client::builder());
#[cfg(not(target_arch = "wasm32"))]
let builder = if let Some(proxy_url) = &config.proxy_url {
builder.proxy(reqwest::Proxy::all(proxy_url).expect("Failed to parse proxy URL"))
Expand Down
2 changes: 1 addition & 1 deletion src/datadogV1/api/api_events.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ impl EventsAPI {
}
pub fn with_config(config: datadog::Configuration) -> Self {
let reqwest_client_builder = {
let builder = reqwest::Client::builder();
let builder = config.apply_headers(reqwest::Client::builder());
#[cfg(not(target_arch = "wasm32"))]
let builder = if let Some(proxy_url) = &config.proxy_url {
builder.proxy(reqwest::Proxy::all(proxy_url).expect("Failed to parse proxy URL"))
Expand Down
2 changes: 1 addition & 1 deletion src/datadogV1/api/api_gcp_integration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ impl GCPIntegrationAPI {
}
pub fn with_config(config: datadog::Configuration) -> Self {
let reqwest_client_builder = {
let builder = reqwest::Client::builder();
let builder = config.apply_headers(reqwest::Client::builder());
#[cfg(not(target_arch = "wasm32"))]
let builder = if let Some(proxy_url) = &config.proxy_url {
builder.proxy(reqwest::Proxy::all(proxy_url).expect("Failed to parse proxy URL"))
Expand Down
2 changes: 1 addition & 1 deletion src/datadogV1/api/api_hosts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ impl HostsAPI {
}
pub fn with_config(config: datadog::Configuration) -> Self {
let reqwest_client_builder = {
let builder = reqwest::Client::builder();
let builder = config.apply_headers(reqwest::Client::builder());
#[cfg(not(target_arch = "wasm32"))]
let builder = if let Some(proxy_url) = &config.proxy_url {
builder.proxy(reqwest::Proxy::all(proxy_url).expect("Failed to parse proxy URL"))
Expand Down
2 changes: 1 addition & 1 deletion src/datadogV1/api/api_ip_ranges.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ impl IPRangesAPI {
}
pub fn with_config(config: datadog::Configuration) -> Self {
let reqwest_client_builder = {
let builder = reqwest::Client::builder();
let builder = config.apply_headers(reqwest::Client::builder());
#[cfg(not(target_arch = "wasm32"))]
let builder = if let Some(proxy_url) = &config.proxy_url {
builder.proxy(reqwest::Proxy::all(proxy_url).expect("Failed to parse proxy URL"))
Expand Down
2 changes: 1 addition & 1 deletion src/datadogV1/api/api_key_management.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ impl KeyManagementAPI {
}
pub fn with_config(config: datadog::Configuration) -> Self {
let reqwest_client_builder = {
let builder = reqwest::Client::builder();
let builder = config.apply_headers(reqwest::Client::builder());
#[cfg(not(target_arch = "wasm32"))]
let builder = if let Some(proxy_url) = &config.proxy_url {
builder.proxy(reqwest::Proxy::all(proxy_url).expect("Failed to parse proxy URL"))
Expand Down
2 changes: 1 addition & 1 deletion src/datadogV1/api/api_logs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ impl LogsAPI {
}
pub fn with_config(config: datadog::Configuration) -> Self {
let reqwest_client_builder = {
let builder = reqwest::Client::builder();
let builder = config.apply_headers(reqwest::Client::builder());
#[cfg(not(target_arch = "wasm32"))]
let builder = if let Some(proxy_url) = &config.proxy_url {
builder.proxy(reqwest::Proxy::all(proxy_url).expect("Failed to parse proxy URL"))
Expand Down
2 changes: 1 addition & 1 deletion src/datadogV1/api/api_logs_indexes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ impl LogsIndexesAPI {
}
pub fn with_config(config: datadog::Configuration) -> Self {
let reqwest_client_builder = {
let builder = reqwest::Client::builder();
let builder = config.apply_headers(reqwest::Client::builder());
#[cfg(not(target_arch = "wasm32"))]
let builder = if let Some(proxy_url) = &config.proxy_url {
builder.proxy(reqwest::Proxy::all(proxy_url).expect("Failed to parse proxy URL"))
Expand Down
2 changes: 1 addition & 1 deletion src/datadogV1/api/api_logs_pipelines.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ impl LogsPipelinesAPI {
}
pub fn with_config(config: datadog::Configuration) -> Self {
let reqwest_client_builder = {
let builder = reqwest::Client::builder();
let builder = config.apply_headers(reqwest::Client::builder());
#[cfg(not(target_arch = "wasm32"))]
let builder = if let Some(proxy_url) = &config.proxy_url {
builder.proxy(reqwest::Proxy::all(proxy_url).expect("Failed to parse proxy URL"))
Expand Down
2 changes: 1 addition & 1 deletion src/datadogV1/api/api_metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ impl MetricsAPI {
}
pub fn with_config(config: datadog::Configuration) -> Self {
let reqwest_client_builder = {
let builder = reqwest::Client::builder();
let builder = config.apply_headers(reqwest::Client::builder());
#[cfg(not(target_arch = "wasm32"))]
let builder = if let Some(proxy_url) = &config.proxy_url {
builder.proxy(reqwest::Proxy::all(proxy_url).expect("Failed to parse proxy URL"))
Expand Down
2 changes: 1 addition & 1 deletion src/datadogV1/api/api_monitors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ impl MonitorsAPI {
}
pub fn with_config(config: datadog::Configuration) -> Self {
let reqwest_client_builder = {
let builder = reqwest::Client::builder();
let builder = config.apply_headers(reqwest::Client::builder());
#[cfg(not(target_arch = "wasm32"))]
let builder = if let Some(proxy_url) = &config.proxy_url {
builder.proxy(reqwest::Proxy::all(proxy_url).expect("Failed to parse proxy URL"))
Expand Down
2 changes: 1 addition & 1 deletion src/datadogV1/api/api_notebooks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ impl NotebooksAPI {
}
pub fn with_config(config: datadog::Configuration) -> Self {
let reqwest_client_builder = {
let builder = reqwest::Client::builder();
let builder = config.apply_headers(reqwest::Client::builder());
#[cfg(not(target_arch = "wasm32"))]
let builder = if let Some(proxy_url) = &config.proxy_url {
builder.proxy(reqwest::Proxy::all(proxy_url).expect("Failed to parse proxy URL"))
Expand Down
2 changes: 1 addition & 1 deletion src/datadogV1/api/api_organizations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ impl OrganizationsAPI {
}
pub fn with_config(config: datadog::Configuration) -> Self {
let reqwest_client_builder = {
let builder = reqwest::Client::builder();
let builder = config.apply_headers(reqwest::Client::builder());
#[cfg(not(target_arch = "wasm32"))]
let builder = if let Some(proxy_url) = &config.proxy_url {
builder.proxy(reqwest::Proxy::all(proxy_url).expect("Failed to parse proxy URL"))
Expand Down
2 changes: 1 addition & 1 deletion src/datadogV1/api/api_pager_duty_integration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ impl PagerDutyIntegrationAPI {
}
pub fn with_config(config: datadog::Configuration) -> Self {
let reqwest_client_builder = {
let builder = reqwest::Client::builder();
let builder = config.apply_headers(reqwest::Client::builder());
#[cfg(not(target_arch = "wasm32"))]
let builder = if let Some(proxy_url) = &config.proxy_url {
builder.proxy(reqwest::Proxy::all(proxy_url).expect("Failed to parse proxy URL"))
Expand Down
2 changes: 1 addition & 1 deletion src/datadogV1/api/api_security_monitoring.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ impl SecurityMonitoringAPI {
}
pub fn with_config(config: datadog::Configuration) -> Self {
let reqwest_client_builder = {
let builder = reqwest::Client::builder();
let builder = config.apply_headers(reqwest::Client::builder());
#[cfg(not(target_arch = "wasm32"))]
let builder = if let Some(proxy_url) = &config.proxy_url {
builder.proxy(reqwest::Proxy::all(proxy_url).expect("Failed to parse proxy URL"))
Expand Down
2 changes: 1 addition & 1 deletion src/datadogV1/api/api_service_checks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ impl ServiceChecksAPI {
}
pub fn with_config(config: datadog::Configuration) -> Self {
let reqwest_client_builder = {
let builder = reqwest::Client::builder();
let builder = config.apply_headers(reqwest::Client::builder());
#[cfg(not(target_arch = "wasm32"))]
let builder = if let Some(proxy_url) = &config.proxy_url {
builder.proxy(reqwest::Proxy::all(proxy_url).expect("Failed to parse proxy URL"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ impl ServiceLevelObjectiveCorrectionsAPI {
}
pub fn with_config(config: datadog::Configuration) -> Self {
let reqwest_client_builder = {
let builder = reqwest::Client::builder();
let builder = config.apply_headers(reqwest::Client::builder());
#[cfg(not(target_arch = "wasm32"))]
let builder = if let Some(proxy_url) = &config.proxy_url {
builder.proxy(reqwest::Proxy::all(proxy_url).expect("Failed to parse proxy URL"))
Expand Down
2 changes: 1 addition & 1 deletion src/datadogV1/api/api_service_level_objectives.rs
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ impl ServiceLevelObjectivesAPI {
}
pub fn with_config(config: datadog::Configuration) -> Self {
let reqwest_client_builder = {
let builder = reqwest::Client::builder();
let builder = config.apply_headers(reqwest::Client::builder());
#[cfg(not(target_arch = "wasm32"))]
let builder = if let Some(proxy_url) = &config.proxy_url {
builder.proxy(reqwest::Proxy::all(proxy_url).expect("Failed to parse proxy URL"))
Expand Down
2 changes: 1 addition & 1 deletion src/datadogV1/api/api_slack_integration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ impl SlackIntegrationAPI {
}
pub fn with_config(config: datadog::Configuration) -> Self {
let reqwest_client_builder = {
let builder = reqwest::Client::builder();
let builder = config.apply_headers(reqwest::Client::builder());
#[cfg(not(target_arch = "wasm32"))]
let builder = if let Some(proxy_url) = &config.proxy_url {
builder.proxy(reqwest::Proxy::all(proxy_url).expect("Failed to parse proxy URL"))
Expand Down
2 changes: 1 addition & 1 deletion src/datadogV1/api/api_snapshots.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ impl SnapshotsAPI {
}
pub fn with_config(config: datadog::Configuration) -> Self {
let reqwest_client_builder = {
let builder = reqwest::Client::builder();
let builder = config.apply_headers(reqwest::Client::builder());
#[cfg(not(target_arch = "wasm32"))]
let builder = if let Some(proxy_url) = &config.proxy_url {
builder.proxy(reqwest::Proxy::all(proxy_url).expect("Failed to parse proxy URL"))
Expand Down
2 changes: 1 addition & 1 deletion src/datadogV1/api/api_synthetics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ impl SyntheticsAPI {
}
pub fn with_config(config: datadog::Configuration) -> Self {
let reqwest_client_builder = {
let builder = reqwest::Client::builder();
let builder = config.apply_headers(reqwest::Client::builder());
#[cfg(not(target_arch = "wasm32"))]
let builder = if let Some(proxy_url) = &config.proxy_url {
builder.proxy(reqwest::Proxy::all(proxy_url).expect("Failed to parse proxy URL"))
Expand Down
2 changes: 1 addition & 1 deletion src/datadogV1/api/api_tags.rs
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ impl TagsAPI {
}
pub fn with_config(config: datadog::Configuration) -> Self {
let reqwest_client_builder = {
let builder = reqwest::Client::builder();
let builder = config.apply_headers(reqwest::Client::builder());
#[cfg(not(target_arch = "wasm32"))]
let builder = if let Some(proxy_url) = &config.proxy_url {
builder.proxy(reqwest::Proxy::all(proxy_url).expect("Failed to parse proxy URL"))
Expand Down
2 changes: 1 addition & 1 deletion src/datadogV1/api/api_usage_metering.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1099,7 +1099,7 @@ impl UsageMeteringAPI {
}
pub fn with_config(config: datadog::Configuration) -> Self {
let reqwest_client_builder = {
let builder = reqwest::Client::builder();
let builder = config.apply_headers(reqwest::Client::builder());
#[cfg(not(target_arch = "wasm32"))]
let builder = if let Some(proxy_url) = &config.proxy_url {
builder.proxy(reqwest::Proxy::all(proxy_url).expect("Failed to parse proxy URL"))
Expand Down
2 changes: 1 addition & 1 deletion src/datadogV1/api/api_users.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ impl UsersAPI {
}
pub fn with_config(config: datadog::Configuration) -> Self {
let reqwest_client_builder = {
let builder = reqwest::Client::builder();
let builder = config.apply_headers(reqwest::Client::builder());
#[cfg(not(target_arch = "wasm32"))]
let builder = if let Some(proxy_url) = &config.proxy_url {
builder.proxy(reqwest::Proxy::all(proxy_url).expect("Failed to parse proxy URL"))
Expand Down
2 changes: 1 addition & 1 deletion src/datadogV1/api/api_webhooks_integration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ impl WebhooksIntegrationAPI {
}
pub fn with_config(config: datadog::Configuration) -> Self {
let reqwest_client_builder = {
let builder = reqwest::Client::builder();
let builder = config.apply_headers(reqwest::Client::builder());
#[cfg(not(target_arch = "wasm32"))]
let builder = if let Some(proxy_url) = &config.proxy_url {
builder.proxy(reqwest::Proxy::all(proxy_url).expect("Failed to parse proxy URL"))
Expand Down
2 changes: 1 addition & 1 deletion src/datadogV2/api/api_action_connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ impl ActionConnectionAPI {
}
pub fn with_config(config: datadog::Configuration) -> Self {
let reqwest_client_builder = {
let builder = reqwest::Client::builder();
let builder = config.apply_headers(reqwest::Client::builder());
#[cfg(not(target_arch = "wasm32"))]
let builder = if let Some(proxy_url) = &config.proxy_url {
builder.proxy(reqwest::Proxy::all(proxy_url).expect("Failed to parse proxy URL"))
Expand Down
2 changes: 1 addition & 1 deletion src/datadogV2/api/api_actions_datastores.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ impl ActionsDatastoresAPI {
}
pub fn with_config(config: datadog::Configuration) -> Self {
let reqwest_client_builder = {
let builder = reqwest::Client::builder();
let builder = config.apply_headers(reqwest::Client::builder());
#[cfg(not(target_arch = "wasm32"))]
let builder = if let Some(proxy_url) = &config.proxy_url {
builder.proxy(reqwest::Proxy::all(proxy_url).expect("Failed to parse proxy URL"))
Expand Down
2 changes: 1 addition & 1 deletion src/datadogV2/api/api_agent_observability.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1206,7 +1206,7 @@ impl AgentObservabilityAPI {
}
pub fn with_config(config: datadog::Configuration) -> Self {
let reqwest_client_builder = {
let builder = reqwest::Client::builder();
let builder = config.apply_headers(reqwest::Client::builder());
#[cfg(not(target_arch = "wasm32"))]
let builder = if let Some(proxy_url) = &config.proxy_url {
builder.proxy(reqwest::Proxy::all(proxy_url).expect("Failed to parse proxy URL"))
Expand Down
2 changes: 1 addition & 1 deletion src/datadogV2/api/api_agentless_scanning.rs
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ impl AgentlessScanningAPI {
}
pub fn with_config(config: datadog::Configuration) -> Self {
let reqwest_client_builder = {
let builder = reqwest::Client::builder();
let builder = config.apply_headers(reqwest::Client::builder());
#[cfg(not(target_arch = "wasm32"))]
let builder = if let Some(proxy_url) = &config.proxy_url {
builder.proxy(reqwest::Proxy::all(proxy_url).expect("Failed to parse proxy URL"))
Expand Down
2 changes: 1 addition & 1 deletion src/datadogV2/api/api_annotations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ impl AnnotationsAPI {
}
pub fn with_config(config: datadog::Configuration) -> Self {
let reqwest_client_builder = {
let builder = reqwest::Client::builder();
let builder = config.apply_headers(reqwest::Client::builder());
#[cfg(not(target_arch = "wasm32"))]
let builder = if let Some(proxy_url) = &config.proxy_url {
builder.proxy(reqwest::Proxy::all(proxy_url).expect("Failed to parse proxy URL"))
Expand Down
Loading
Loading