1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
//! # XDiff-NG: HTTP Request Comparison and Building Tools
//!
//! XDiff-NG is a powerful command-line toolkit for HTTP request comparison and construction.
//! It provides two main utilities:
//!
//! - **xdiff**: A sophisticated diff tool for comparing HTTP requests and responses
//! - **xreq**: A flexible HTTP request builder based on predefined profiles
//!
//! ## Features
//!
//! - Smart HTTP comparison with configurable skip rules
//! - Syntax highlighting for better readability
//! - YAML-based configuration with profile support
//! - High performance built with Rust
//! - Rich output formats and highlighting
//! - Extensible with custom profiles and configurations
//!
//! ## Example Usage
//!
//! ```no_run
//! use xdiff_live::{DiffConfig, ExtraArgs};
//!
//! # async fn example() -> Result<(), Box<dyn std::error::Error>> {
//! // Load configuration from YAML file
//! let config = DiffConfig::load_yaml("config.yml").await?;
//!
//! // Get a specific profile
//! let profile = config.get_profile("api_comparison").unwrap();
//!
//! // Create extra arguments for parameter override
//! let extra_args = ExtraArgs::new_with_query(vec![
//! ("param1".to_string(), "value1".to_string()),
//! ]);
//!
//! // Perform the comparison
//! let diff_result = profile.diff(extra_args).await?;
//! println!("{}", diff_result);
//! # Ok(())
//! # }
//! ```
pub use ;
pub use ;
/// Extra arguments for HTTP requests that can override or supplement
/// the base configuration from profiles.
///
/// This structure allows users to provide additional headers, query parameters,
/// and body parameters that will be merged with the profile configuration.
///
/// # Examples
///
/// ```
/// use xdiff_live::ExtraArgs;
///
/// // Create extra args with custom headers
/// let extra = ExtraArgs::new_with_headers(vec![
/// ("Authorization".to_string(), "Bearer token123".to_string()),
/// ("User-Agent".to_string(), "MyApp/1.0".to_string()),
/// ]);
///
/// // Create extra args with query parameters
/// let extra = ExtraArgs::new_with_query(vec![
/// ("page".to_string(), "1".to_string()),
/// ("limit".to_string(), "50".to_string()),
/// ]);
/// ```