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
use crateprint_formatted_error;
use header;
/// Constructs and returns authorization headers for making authenticated HTTP requests
///
/// # Arguments
///
/// * `access_token` - A string representing the access token for authentication.
///
/// # Returns
///
/// A `HeaderMap` containing the "Authorization" header with the provided access token.
///
/// # Panics
///
/// This function will panic and exit the process with an error message if it fails to
/// create the "Authorization" header from the provided access token.
///
/// # Example
///
/// ```
/// use common::authorization_headers;
///
/// let access_token = "your_access_token";
/// let headers = authorization_headers(access_token);
/// ```
///
/// The function returns a `HeaderMap` that can be used for making authenticated HTTP requests.
///
/// Note: Ensure that the provided access token is valid and properly formatted.