hashicorp / terraform-provider-consul

Terraform Consul provider
https://www.terraform.io/docs/providers/consul/
Mozilla Public License 2.0
125 stars 113 forks source link

Use a temporary workaround to set the Content-Type header #255

Closed remilapeyre closed 3 years ago

remilapeyre commented 3 years ago

This define a custom RoundTripper to add the Content-Type header when it is needed. This commit should be reverted once https://github.com/hashicorp/consul/pull/10204 is merged and released upstream.

I did not write a test for this change but tested locally and the header is correctly present for PUT requests but not for GET or DELETE.