rackspace / gophercloud

A Go SDK for OpenStack. IN FEATURE FREEZE. See Issue #592
http://gophercloud.io
Other
456 stars 180 forks source link

Adding 200 response code for POST request #502

Closed goru97 closed 9 years ago

goru97 commented 9 years ago

What: Added 200 as ok response code for POST requests.

Why: There is one Rackspace-metrics API (http://docs.rackspace.com/cmet/api/v1.0/cmet-devguide/content/POST_sendMetricsList_views_Query_Operations.html) that responds with 200 code against POST request.

Is it Okay?: Yes, It's OK to send 200 against POST requests. http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html

jrperritt commented 9 years ago

Instead, just override the expected response codes like here: https://github.com/rackspace/gophercloud/blob/master/openstack/networking/v2/extensions/lbaas/pools/requests.go#L142

goru97 commented 9 years ago

@jrperritt That worked! Thanks very much :)