text
stringlengths
70
351k
source
stringclasses
4 values
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/authentication.rs | crate: router use std::str::FromStr; use actix_web::http::header::HeaderMap; use error_stack::{report, ResultExt}; use self::blacklist::BlackList; use self::detached::ExtractedPayload; use self::detached::GetAuthType; use super::authoriz...
ast_fragments
// file: hyperswitch/crates/router/src/services/authentication.rs | crate: router use actix_web::http::header::HeaderMap; use self::blacklist::BlackList; use self::detached::ExtractedPayload; use self::detached::GetAuthType; use super::authorization::{self, permissions::Permission}; use crate::core::errors::UserResult;...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/authentication.rs | crate: router use actix_web::http::header::HeaderMap; use self::blacklist::BlackList; use self::detached::ExtractedPayload; use self::detached::GetAuthType; use super::authorization::{self, permissions::Permission}; use crate::core::erro...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/authentication.rs | crate: router use actix_web::http::header::HeaderMap; use self::blacklist::BlackList; use self::detached::ExtractedPayload; use self::detached::GetAuthType; use super::authorization::{self, permissions::Permission}; use crate::core::erro...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/authentication.rs | crate: router use actix_web::http::header::HeaderMap; use self::blacklist::BlackList; use self::detached::ExtractedPayload; use self::detached::GetAuthType; use super::authorization::{self, permissions::Permission}; use crate::core::erro...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/authentication.rs | crate: router use actix_web::http::header::HeaderMap; use common_utils::{date_time, fp_utils, id_type}; use crate::core::errors::UserResult; use crate::{ core::{ api_keys, errors::{self, utils::StorageErrorExt, Router...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/authentication.rs | crate: router use common_utils::{date_time, fp_utils, id_type}; use self::blacklist::BlackList; use self::detached::ExtractedPayload; use self::detached::GetAuthType; use super::authorization::{self, permissions::Permission}; use crate::...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/authentication.rs | crate: router use actix_web::http::header::HeaderMap; use self::blacklist::BlackList; use self::detached::ExtractedPayload; use self::detached::GetAuthType; use super::authorization::{self, permissions::Permission}; use crate::core::erro...
ast_fragments
// file: hyperswitch/crates/router/src/services/authentication.rs | crate: router use common_utils::{date_time, fp_utils, id_type}; use self::blacklist::BlackList; use self::detached::ExtractedPayload; use self::detached::GetAuthType; use super::authorization::{self, permissions::Permission}; use crate::core::errors::U...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/authentication.rs | crate: router use std::str::FromStr; use common_utils::{date_time, fp_utils, id_type}; use super::jwt; use crate::configs::Settings; use crate::consts; use crate::core::errors::UserResult; pub type AuthenticationDataWithUserId = (Authent...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/authentication.rs | crate: router use actix_web::http::header::HeaderMap; use common_utils::{date_time, fp_utils, id_type}; use crate::core::errors::UserResult; use crate::{ core::{ api_keys, errors::{self, utils::StorageErrorExt, Router...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/authentication.rs | crate: router use actix_web::http::header::HeaderMap; use common_utils::{date_time, fp_utils, id_type}; use crate::core::errors::UserResult; use crate::{ core::{ api_keys, errors::{self, utils::StorageErrorExt, Router...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/authentication.rs | crate: router use actix_web::http::header::HeaderMap; use crate::{ core::{ api_keys, errors::{self, utils::StorageErrorExt, RouterResult}, }, headers, routes::app::SessionStateInfo, services::api, ...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/authentication.rs | crate: router use actix_web::http::header::HeaderMap; use crate::{ core::{ api_keys, errors::{self, utils::StorageErrorExt, RouterResult}, }, headers, routes::app::SessionStateInfo, services::api, ...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/authentication.rs | crate: router use std::str::FromStr; use crate::core::errors::UserResult; use crate::{ core::{ api_keys, errors::{self, utils::StorageErrorExt, RouterResult}, }, headers, routes::app::SessionStateInfo, ...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/authentication.rs | crate: router use std::str::FromStr; use actix_web::http::header::HeaderMap; use error_stack::{report, ResultExt}; use crate::core::errors::UserResult; use crate::{ core::{ api_keys, errors::{self, utils::StorageError...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/authentication.rs | crate: router use std::str::FromStr; use actix_web::http::header::HeaderMap; use crate::core::errors::UserResult; use crate::{ core::{ api_keys, errors::{self, utils::StorageErrorExt, RouterResult}, }, headers...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/authentication.rs | crate: router use std::str::FromStr; use actix_web::http::header::HeaderMap; use error_stack::{report, ResultExt}; use crate::core::errors::UserResult; use crate::{ core::{ api_keys, errors::{self, utils::StorageError...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/authentication.rs | crate: router use std::str::FromStr; use actix_web::http::header::HeaderMap; use crate::core::errors::UserResult; use crate::{ core::{ api_keys, errors::{self, utils::StorageErrorExt, RouterResult}, }, headers...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/authentication.rs | crate: router use std::str::FromStr; use actix_web::http::header::HeaderMap; use crate::{ core::{ api_keys, errors::{self, utils::StorageErrorExt, RouterResult}, }, headers, routes::app::SessionStateInfo, ...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/authentication.rs | crate: router use std::str::FromStr; use jsonwebtoken::{decode, Algorithm, DecodingKey, Validation}; use serde::Serialize; use crate::core::errors::UserResult; use crate::{ core::{ api_keys, errors::{self, utils::Stor...
ast_fragments
// file: hyperswitch/crates/router/src/services/authentication.rs | crate: router use actix_web::http::header::HeaderMap; use crate::{ core::{ api_keys, errors::{self, utils::StorageErrorExt, RouterResult}, }, headers, routes::app::SessionStateInfo, services::api, types::{domain,...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/authentication.rs | crate: router use actix_web::http::header::HeaderMap; use crate::{ core::{ api_keys, errors::{self, utils::StorageErrorExt, RouterResult}, }, headers, routes::app::SessionStateInfo, services::api, ...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/authentication.rs | crate: router use actix_web::http::header::HeaderMap; use crate::{ core::{ api_keys, errors::{self, utils::StorageErrorExt, RouterResult}, }, headers, routes::app::SessionStateInfo, services::api, ...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/authentication.rs | crate: router use self::blacklist::BlackList; use self::detached::ExtractedPayload; use self::detached::GetAuthType; use super::authorization::{self, permissions::Permission}; use crate::{ core::{ api_keys, errors::{s...
ast_fragments
// file: hyperswitch/crates/router/src/services/authentication.rs | crate: router use self::blacklist::BlackList; use self::detached::ExtractedPayload; use self::detached::GetAuthType; use super::authorization::{self, permissions::Permission}; use crate::{ core::{ api_keys, errors::{self, utils::Sto...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/authentication.rs | crate: router use actix_web::http::header::HeaderMap; use crate::{ core::{ api_keys, errors::{self, utils::StorageErrorExt, RouterResult}, }, headers, routes::app::SessionStateInfo, services::api, ...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/authentication.rs | crate: router use std::str::FromStr; use actix_web::http::header::HeaderMap; use self::blacklist::BlackList; use self::detached::ExtractedPayload; use self::detached::GetAuthType; use super::authorization::{self, permissions::Permission}...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/authentication.rs | crate: router use actix_web::http::header::HeaderMap; use common_utils::{date_time, fp_utils, id_type}; use self::blacklist::BlackList; use self::detached::ExtractedPayload; use self::detached::GetAuthType; use super::authorization::{sel...
ast_fragments
// file: hyperswitch/crates/router/src/services/authentication.rs | crate: router use std::str::FromStr; use actix_web::http::header::HeaderMap; use error_stack::{report, ResultExt}; use self::blacklist::BlackList; use self::detached::ExtractedPayload; use self::detached::GetAuthType; use super::authorization::{self, p...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/authentication.rs | crate: router use std::str::FromStr; use actix_web::http::header::HeaderMap; use error_stack::{report, ResultExt}; use self::blacklist::BlackList; use self::detached::ExtractedPayload; use self::detached::GetAuthType; use super::authoriz...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/authentication.rs | crate: router use actix_web::http::header::HeaderMap; use crate::{ core::{ api_keys, errors::{self, utils::StorageErrorExt, RouterResult}, }, headers, routes::app::SessionStateInfo, services::api, ...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/authentication.rs | crate: router use common_utils::{date_time, fp_utils, id_type}; use crate::core::errors::UserResult; use crate::{ core::{ api_keys, errors::{self, utils::StorageErrorExt, RouterResult}, }, headers, routes:...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/authentication.rs | crate: router use self::blacklist::BlackList; use self::detached::ExtractedPayload; use self::detached::GetAuthType; use super::authorization::{self, permissions::Permission}; use crate::{ core::{ api_keys, errors::{s...
ast_fragments
// file: hyperswitch/crates/router/src/services/authentication.rs | crate: router use actix_web::http::header::HeaderMap; use self::blacklist::BlackList; use self::detached::ExtractedPayload; use self::detached::GetAuthType; use super::authorization::{self, permissions::Permission}; use crate::{ core::{ api...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/authentication.rs | crate: router use actix_web::http::header::HeaderMap; use self::blacklist::BlackList; use self::detached::ExtractedPayload; use self::detached::GetAuthType; use super::authorization::{self, permissions::Permission}; use crate::{ core...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/authentication.rs | crate: router use common_utils::{date_time, fp_utils, id_type}; use self::blacklist::BlackList; use self::detached::ExtractedPayload; use self::detached::GetAuthType; use super::authorization::{self, permissions::Permission}; use crate::...
ast_fragments
// file: hyperswitch/crates/router/src/services/authentication.rs | crate: router use common_utils::{date_time, fp_utils, id_type}; use self::blacklist::BlackList; use self::detached::ExtractedPayload; use self::detached::GetAuthType; use super::authorization::{self, permissions::Permission}; use crate::{ core::{ ...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/authentication.rs | crate: router use std::str::FromStr; use common_utils::{date_time, fp_utils, id_type}; use super::jwt; use crate::configs::Settings; use crate::consts; use crate::core::errors::UserResult; pub type AuthenticationDataWithUserId = (Authent...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/authentication.rs | crate: router use std::str::FromStr; use common_enums::TokenPurpose; use common_utils::{date_time, fp_utils, id_type}; use super::jwt; use crate::configs::Settings; use crate::consts; use crate::core::errors::UserResult; use crate::{ ...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/authentication.rs | crate: router use common_utils::{date_time, fp_utils, id_type}; use self::blacklist::BlackList; use self::detached::ExtractedPayload; use self::detached::GetAuthType; use super::authorization::{self, permissions::Permission}; use crate::...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/authentication.rs | crate: router use error_stack::{report, ResultExt}; use self::blacklist::BlackList; use self::detached::ExtractedPayload; use self::detached::GetAuthType; use super::authorization::{self, permissions::Permission}; use crate::{ core::...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/authentication.rs | crate: router use actix_web::http::header::HeaderMap; use common_utils::{date_time, fp_utils, id_type}; use error_stack::{report, ResultExt}; use self::blacklist::BlackList; use self::detached::ExtractedPayload; use self::detached::GetAu...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/api.rs | crate: router fn get_hyper_loader_sdk(sdk_url: &str) -> String { format!("<script src=\"{sdk_url}\" onload=\"initializeSDK()\"></script>") } fn get_preload_link_html_template(sdk_url: &str) -> String { format!( r#"<link rel="preloa...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/api.rs | crate: router use common_utils::{ consts::{DEFAULT_TENANT, TENANT_HEADER, X_HS_LATENCY}, errors::{ErrorSwitch, ReportSwitchExt}, request::RequestContent, }; pub use hyperswitch_domain_models::{ api::{ ApplicationResponse, Ge...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/api.rs | crate: router .content_type(mime::APPLICATION_JSON) .body(response) } pub fn http_server_error_json_response<T: body::MessageBody + 'static>( response: T, ) -> HttpResponse { HttpResponse::InternalServerError() .con...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/api.rs | crate: router use common_utils::{ consts::{DEFAULT_TENANT, TENANT_HEADER, X_HS_LATENCY}, errors::{ErrorSwitch, ReportSwitchExt}, request::RequestContent, }; use error_stack::{report, Report, ResultExt}; use serde_json::json; use self::r...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/api.rs | crate: router while let Some(err) = source { if let Some(hyper_err) = err.downcast_ref::<hyper::Error>() { if hyper_err.is_incomplete_message() { return true; } } source = err.sour...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/api.rs | crate: router )) } } } } None => Ok(router_data), } } } } #[instrument(skip_all)] pub a...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/api.rs | crate: router fn get_hyper_loader_sdk(sdk_url: &str) -> String { format!("<script src=\"{sdk_url}\" onload=\"initializeSDK()\"></script>") } fn get_preload_link_html_template(sdk_url: &str) -> String { format!( r#"<link rel="preloa...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/api.rs | crate: router use std::{ collections::{HashMap, HashSet}, error::Error, fmt::Debug, future::Future, str, sync::Arc, time::{Duration, Instant}, }; fn get_hyper_loader_sdk(sdk_url: &str) -> String { {<|fim_suffix|> <|fim_m...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/api.rs | crate: router use serde_json::json; fn test_mime_essence() { <|fim_suffix|> <|fim_middle|> }
ast_fragments
// file: hyperswitch/crates/router/src/services/api.rs | crate: router use std::{ collections::{HashMap, HashSet}, error::Error, fmt::Debug, future::Future, str, sync::Arc, time::{Duration, Instant}, }; fn get_hyper_loader_sdk(sdk_url: &str) -> String { format!("<script src=\"{sdk_url}\"...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/api.rs | crate: router include_str!("../core/payment_link/payment_link_initiate/payment_link_initiator.js") .to_string(); context.insert("payment_link_initiator", &payment_link_initiator); tera.render("payment_link", &context) ...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/api.rs | crate: router "hyperloader_sdk_link", &get_hyper_loader_sdk(&payment_link_data.sdk_url), ); context.insert("locale_template", &locale_template); context.insert("rendered_css", &rendered_css); context.insert("rendered...
ast_fragments
// file: hyperswitch/crates/router/src/services/api.rs | crate: router redirection_response: api::RedirectionResponse, ) -> HttpResponse { HttpResponse::Ok() .content_type(mime::APPLICATION_JSON) .append_header(( "Location", redirection_response.return_url_with_query_para...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/api.rs | crate: router res_builder.insert_header((HeaderName::from_static(key), header_val)); } } } res_builder.body(res) } pub fn http_response_ok() -> HttpResponse { HttpResponse::Ok().finish() } pub fn h...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/api.rs | crate: router if let Some(headers) = optional_headers { for (key, value) in headers { if let Ok(header_val) = HeaderValue::try_from(value) { res_builder.insert_header((HeaderName::from_static(key), header_va...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/api.rs | crate: router pub fn http_response_plaintext<T: body::MessageBody + 'static>(res: T) -> HttpResponse { HttpResponse::Ok().content_type(mime::TEXT_PLAIN).body(res) } pub fn http_response_file_data<T: body::MessageBody + 'static>( res: T, ...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/api.rs | crate: router response_builder.append_header((header_name, header_value)); } response_builder .content_type(mime::APPLICATION_JSON) .body(response) } pub fn http_response_plaintext<T: body::MessageBody + 'static>(r...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/api.rs | crate: router if is_sensitive_header { header_value.set_sensitive(true); } response_builder.append_header((header_name, header_value)); } response_builder .content_type(mime::APPLICATION_JSON) ...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/api.rs | crate: router impl EmbedError for Report<hyperswitch_domain_models::errors::api_error_response::ApiErrorResponse> { } pub fn http_response_json<T: body::MessageBody + 'static>(response: T) -> HttpResponse { HttpResponse::Ok() .con...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/api.rs | crate: router let response_code = res.status().as_u16(); tracing::Span::current().record("status_code", response_code); let end_instant = Instant::now(); let request_duration = end_instant.saturating_duration_since(start_instant); ...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/api.rs | crate: router use std::{ collections::{HashMap, HashSet}, error::Error, fmt::Debug, future::Future, str, sync::Arc, time::{Duration, Instant}, }; use tera::{Context, Error as TeraError, Tera}; fn is_connection_closed_bef...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/api.rs | crate: router } Err(err) => { logger::info!( call_connector_api_error=?err ); } } handle_response(response).await } #[instrument(skip_all)] pub async fn send_request( sta...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/api.rs | crate: router status_code.to_string(), flow.to_string(), merchant_id.to_owned(), ); output } #[instrument( skip(request, state, func, api_auth, payload), fields(request_method, request_url_path, status_code...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/api.rs | crate: router #[derive(Clone, Copy, PartialEq, Eq)] pub enum AuthFlow { Client, Merchant, } #[allow(clippy::too_many_arguments)] #[instrument( skip(request, payload, state, func, api_auth, incoming_request_header), fields(merchant...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/api.rs | crate: router pub type BoxedBillingConnectorPaymentsSyncIntegrationInterface<T, Req, Res> = BoxedConnectorIntegrationInterface< T, common_types::BillingConnectorPaymentsSyncFlowData, Req, Res, >; /// Handle ...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/api/client.rs | crate: router use masking::{ExposeInterface, PeekInterface}; use reqwest::multipart::Form; use crate::{ configs::settings::Proxy, consts::BASE64_ENGINE, core::errors::{ApiClientError, CustomResult}, routes::SessionState, }; p...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/api/client.rs | crate: router use std::time::Duration; use http::{HeaderValue, Method}; use reqwest::multipart::Form; use crate::{ configs::settings::Proxy, consts::BASE64_ENGINE, core::errors::{ApiClientError, CustomResult}, routes::Session...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/api/client.rs | crate: router use reqwest::multipart::Form; use super::{request::Maskable, Request}; use crate::{ configs::settings::Proxy, consts::BASE64_ENGINE, core::errors::{ApiClientError, CustomResult}, routes::SessionState, }; async f...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/api/client.rs | crate: router use reqwest::multipart::Form; fn multipart(&mut self, form: Form) { {<|fim_suffix|> <|fim_middle|> }}
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/api/client.rs | crate: router fn add_flow_name(&mut self, _flow_name: String) { <|fim_suffix|> <|fim_middle|> }
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/api/client.rs | crate: router use router_env::tracing_actix_web::RequestId; fn add_request_id(&mut self, _request_id: RequestId) { {<|fim_suffix|> <|fim_middle|> }}
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/api/client.rs | crate: router use reqwest::multipart::Form; use super::{request::Maskable, Request}; use crate::{ configs::settings::Proxy, consts::BASE64_ENGINE, core::errors::{ApiClientError, CustomResult}, routes::SessionState, }; async f...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/api/client.rs | crate: router use http::{HeaderValue, Method}; use masking::{ExposeInterface, PeekInterface}; use crate::{ configs::settings::Proxy, consts::BASE64_ENGINE, core::errors::{ApiClientError, CustomResult}, routes::SessionState, }...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/api/client.rs | crate: router use http::{HeaderValue, Method}; use super::{request::Maskable, Request}; use crate::{ configs::settings::Proxy, consts::BASE64_ENGINE, core::errors::{ApiClientError, CustomResult}, routes::SessionState, }; fn r...
ast_fragments
// file: hyperswitch/crates/router/src/services/api/client.rs | crate: router use reqwest::multipart::Form; use super::{request::Maskable, Request}; use crate::{ configs::settings::Proxy, consts::BASE64_ENGINE, core::errors::{ApiClientError, CustomResult}, routes::SessionState, }; async fn send_request(...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/api/client.rs | crate: router use http::{HeaderValue, Method}; use masking::{ExposeInterface, PeekInterface}; use super::{request::Maskable, Request}; use crate::{ configs::settings::Proxy, consts::BASE64_ENGINE, core::errors::{ApiClientError, C...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/api/client.rs | crate: router use http::{HeaderValue, Method}; use super::{request::Maskable, Request}; use crate::{ configs::settings::Proxy, consts::BASE64_ENGINE, core::errors::{ApiClientError, CustomResult}, routes::SessionState, }; fn r...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/api/client.rs | crate: router use reqwest::multipart::Form; use crate::{ configs::settings::Proxy, consts::BASE64_ENGINE, core::errors::{ApiClientError, CustomResult}, routes::SessionState, }; fn send( self, ) -> CustomResult< ...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/api/client.rs | crate: router use http::{HeaderValue, Method}; use super::{request::Maskable, Request}; use crate::{ configs::settings::Proxy, consts::BASE64_ENGINE, core::errors::{ApiClientError, CustomResult}, routes::SessionState, }; fn h...
ast_fragments
// file: hyperswitch/crates/router/src/services/api/client.rs | crate: router use reqwest::multipart::Form; fn multipart(&mut self, form: Form) { self.inner = self.inner.take().map(|r| r.multipart(form)); }
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/api/client.rs | crate: router use std::time::Duration; fn timeout(&mut self, timeout: Duration) { <|fim_suffix|> <|fim_middle|> }
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/api/client.rs | crate: router fn url_encoded_form(&mut self, body: serde_json::Value) { {<|fim_suffix|> <|fim_middle|> }}
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/api/client.rs | crate: router fn json(&mut self, body: serde_json::Value) { {<|fim_suffix|> <|fim_middle|> }}
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/api/client.rs | crate: router use masking::{ExposeInterface, PeekInterface}; use reqwest::multipart::Form; use crate::{ configs::settings::Proxy, consts::BASE64_ENGINE, core::errors::{ApiClientError, CustomResult}, routes::SessionState, }; p...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/api/client.rs | crate: router use crate::{ configs::settings::Proxy, consts::BASE64_ENGINE, core::errors::{ApiClientError, CustomResult}, routes::SessionState, }; pub fn new(proxy_config: &Proxy) -> CustomResult<Self, ApiClientError> { <|fim...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/api/client.rs | crate: router use error_stack::ResultExt; use masking::{ExposeInterface, PeekInterface}; use reqwest::multipart::Form; use crate::{ configs::settings::Proxy, consts::BASE64_ENGINE, core::errors::{ApiClientError, CustomResult}, ...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/api/client.rs | crate: router use error_stack::ResultExt; use masking::{ExposeInterface, PeekInterface}; use reqwest::multipart::Form; use crate::{ configs::settings::Proxy, consts::BASE64_ENGINE, core::errors::{ApiClientError, CustomResult}, ...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/api/client.rs | crate: router use reqwest::multipart::Form; use crate::{ configs::settings::Proxy, consts::BASE64_ENGINE, core::errors::{ApiClientError, CustomResult}, routes::SessionState, }; fn get_base_client(proxy_config: &Proxy) -> Cust...
ast_fragments
// file: hyperswitch/crates/router/src/services/api/generic_link_response.rs | crate: router use common_utils::errors::CustomResult; use hyperswitch_domain_models::api::{ GenericExpiredLinkData, GenericLinkFormData, GenericLinkStatusData, GenericLinksData, }; use tera::{Context, Tera}; use crate::core::errors; pub ...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/api/generic_link_response.rs | crate: router use common_utils::errors::CustomResult; use hyperswitch_domain_models::api::{ GenericExpiredLinkData, GenericLinkFormData, GenericLinkStatusData, GenericLinksData, }; use tera::{Context, Tera}; use crate::cor...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/api/generic_link_response.rs | crate: router use common_utils::errors::CustomResult; use hyperswitch_domain_models::api::{ GenericExpiredLinkData, GenericLinkFormData, GenericLinkStatusData, GenericLinksData, }; use tera::{Context, Tera}; use crate::cor...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/api/generic_link_response.rs | crate: router use common_utils::errors::CustomResult; use hyperswitch_domain_models::api::{ GenericExpiredLinkData, GenericLinkFormData, GenericLinkStatusData, GenericLinksData, }; use tera::{Context, Tera}; use crate::cor...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/api/generic_link_response.rs | crate: router use common_utils::errors::CustomResult; use hyperswitch_domain_models::api::{ GenericExpiredLinkData, GenericLinkFormData, GenericLinkStatusData, GenericLinksData, }; use tera::{Context, Tera}; use crate::cor...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/api/generic_link_response.rs | crate: router use common_utils::errors::CustomResult; use hyperswitch_domain_models::api::{ GenericExpiredLinkData, GenericLinkFormData, GenericLinkStatusData, GenericLinksData, }; use tera::{Context, Tera}; use crate::cor...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/api/generic_link_response.rs | crate: router use common_utils::errors::CustomResult; use hyperswitch_domain_models::api::{ GenericExpiredLinkData, GenericLinkFormData, GenericLinkStatusData, GenericLinksData, }; use tera::{Context, Tera}; use crate::cor...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/api/generic_link_response.rs | crate: router use common_utils::errors::CustomResult; use hyperswitch_domain_models::api::{ GenericExpiredLinkData, GenericLinkFormData, GenericLinkStatusData, GenericLinksData, }; use tera::{Context, Tera}; use crate::cor...
ast_fragments
<|fim_prefix|> // file: hyperswitch/crates/router/src/services/api/generic_link_response.rs | crate: router use common_utils::errors::CustomResult; use hyperswitch_domain_models::api::{ GenericExpiredLinkData, GenericLinkFormData, GenericLinkStatusData, GenericLinksData, }; use super::build_secure_payment_link_html...
ast_fragments