(req *http.Request)
| 374 | } |
| 375 | |
| 376 | func (a *Adapter) applyAPIKey(req *http.Request) { |
| 377 | if k := a.apiKey(); k != "" { |
| 378 | if a.vertex { |
| 379 | req.Header.Set("Authorization", "Bearer "+k) |
| 380 | } else { |
| 381 | req.Header.Set("x-goog-api-key", k) |
| 382 | } |
| 383 | } |
| 384 | } |
| 385 | |
| 386 | func (a *Adapter) applyExtraHeaders(req *http.Request) { |
| 387 | for hk, v := range a.cfg.Headers { |
no test coverage detected