vultr / govultr

Vultr Go API client
MIT License
232 stars 56 forks source link

[Feature] - Support responses of type application/yaml #279

Open optik-aper opened 11 months ago

optik-aper commented 11 months ago

Currently, the DoWithContext only does JSON unmarshalling of responses. This errors when there is an invalid JSON body like with application/yaml.

Some kind of header check should determine the type of unmarshal that is to be performed on the body.