Skip to content
This repository has been archived by the owner on Nov 6, 2022. It is now read-only.

Commit

Permalink
Merge pull request #2 from shoenig/f-content-type
Browse files Browse the repository at this point in the history
Support releases-api returned content-type (hashicorp#57)
  • Loading branch information
shoenig committed May 10, 2022
2 parents f04c420 + c41b52a commit 7b51e73
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/releasesjson/releases.go
Expand Up @@ -79,7 +79,7 @@ func (r *Releases) ListProductVersions(ctx context.Context, productName string)
}

contentType := resp.Header.Get("content-type")
if contentType != "application/json" {
if contentType != "application/json" && contentType != "application/vnd+hashicorp.releases-api.v0+json" {
return nil, fmt.Errorf("unexpected Content-Type: %q", contentType)
}

Expand Down Expand Up @@ -144,7 +144,7 @@ func (r *Releases) GetProductVersion(ctx context.Context, product string, versio
}

contentType := resp.Header.Get("content-type")
if contentType != "application/json" {
if contentType != "application/json" && contentType != "application/vnd+hashicorp.releases-api.v0+json" {
return nil, fmt.Errorf("unexpected Content-Type: %q", contentType)
}

Expand Down

0 comments on commit 7b51e73

Please sign in to comment.