datacenter / cobra

Cobra - Python bindings for the ACI REST API
Other
88 stars 41 forks source link

Need to handle HTTP 202 responses #114

Open mtimm opened 8 years ago

mtimm commented 8 years ago

In rare cases the APIC will return a 202 response if a POST request is going to take an exceedingly long time. Cobra raises a CommitError in this case because 202 != http.OK. We can't call it a success because it isn't possible to know if the POST was a success yet.

Along with the 202 the Location is set in the header and the body contains a text message about where to visit to get status.