Skip to content

Commit

Permalink
Merge pull request #25 from meshcloud/fix-accept-header-for-building-…
Browse files Browse the repository at this point in the history
…block-read

fix: Set Accept header when getting a Building Block
  • Loading branch information
sttomm authored Aug 6, 2024
2 parents 1885a89 + b158bc7 commit 00e6b95
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions client/buildingblock.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,12 @@ func (c *MeshStackProviderClient) urlForBuildingBlock(uuid string) *url.URL {

func (c *MeshStackProviderClient) ReadBuildingBlock(uuid string) (*MeshBuildingBlock, error) {
targetUrl := c.urlForBuildingBlock(uuid)

req, err := http.NewRequest("GET", targetUrl.String(), nil)
if err != nil {
return nil, err
}
req.Header.Set("Accept", CONTENT_TYPE_BUILDING_BLOCK)

res, err := c.doAuthenticatedRequest(req)
if err != nil {
Expand Down

0 comments on commit 00e6b95

Please sign in to comment.