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
use var;
use Error;
use HeaderMap;
use HeaderValue;
use AUTHORIZATION;
use Client;
/// Creates a new `reqwest::Client` with default headers.
///
/// This function fetches the `GITHUB_TOKEN` environment variable and uses it to
/// set the `Authorization` header for the client.
///
/// # Returns
///
/// This function returns a `Result` that contains a `reqwest::Client` if the
/// client was successfully created, or an `Error` if the client could not be
/// created.
///
/// # Example
///
/// ```rust
/// let client = create_reqwest_client();
/// ```
///
/// # Errors
///
/// This function will return an error if the `reqwest::Client` could not be
/// built.