Merge pull request #1583 from alexhoshina/fix/#1422-lint-err
fix(provider/azure): lint err
This commit is contained in:
commit
96fd4e0519
2 changed files with 2 additions and 2 deletions
|
|
@ -128,7 +128,7 @@ func (p *Provider) Chat(
|
||||||
// Azure uses api-key header instead of Authorization: Bearer
|
// Azure uses api-key header instead of Authorization: Bearer
|
||||||
req.Header.Set("Content-Type", "application/json")
|
req.Header.Set("Content-Type", "application/json")
|
||||||
if p.apiKey != "" {
|
if p.apiKey != "" {
|
||||||
req.Header.Set("api-key", p.apiKey)
|
req.Header.Set("Api-Key", p.apiKey)
|
||||||
}
|
}
|
||||||
|
|
||||||
resp, err := p.httpClient.Do(req)
|
resp, err := p.httpClient.Do(req)
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,7 @@ func TestProviderChat_AzureAuthHeader(t *testing.T) {
|
||||||
var capturedAuth string
|
var capturedAuth string
|
||||||
|
|
||||||
server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||||
capturedAPIKey = r.Header.Get("api-key")
|
capturedAPIKey = r.Header.Get("Api-Key")
|
||||||
capturedAuth = r.Header.Get("Authorization")
|
capturedAuth = r.Header.Get("Authorization")
|
||||||
writeValidResponse(w)
|
writeValidResponse(w)
|
||||||
}))
|
}))
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue