Add an authorization header, if provided, to the request `builder`.
(mut builder: RequestBuilder, auth_header: &AuthHeader)
| 153 | |
| 154 | /// Add an authorization header, if provided, to the request `builder`. |
| 155 | pub fn add_auth_header_opt(mut builder: RequestBuilder, auth_header: &AuthHeader) -> RequestBuilder { |
| 156 | if let Some(token) = &auth_header.token { |
| 157 | builder = builder.bearer_auth(token); |
| 158 | } |
| 159 | builder |
| 160 | } |
| 161 | |
| 162 | /// Gets the `auth_header` for a request to the server depending on how you want |
| 163 | /// to identify yourself. If you specify `anon_identity = true` then no |
no outgoing calls
no test coverage detected
searching dependent graphs…