Skip to content

Commit b158bc7

Browse files
committed
fix: Set Accept header when getting a Building Block
meshStack enforces the Accept header soon, so we have to make sure to always provide it
1 parent 1885a89 commit b158bc7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Diff for: client/buildingblock.go

+2
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,12 @@ func (c *MeshStackProviderClient) urlForBuildingBlock(uuid string) *url.URL {
8080

8181
func (c *MeshStackProviderClient) ReadBuildingBlock(uuid string) (*MeshBuildingBlock, error) {
8282
targetUrl := c.urlForBuildingBlock(uuid)
83+
8384
req, err := http.NewRequest("GET", targetUrl.String(), nil)
8485
if err != nil {
8586
return nil, err
8687
}
88+
req.Header.Set("Accept", CONTENT_TYPE_BUILDING_BLOCK)
8789

8890
res, err := c.doAuthenticatedRequest(req)
8991
if err != nil {

0 commit comments

Comments
 (0)