skynetservices/skydns — pull request #79 by amuino (2014-02-11 14:50:57+00:00)
Title: Client should follow API redirects

Since the *slave* skydns processes return a `301` redirect to the master for write operations, the client implementation should follow them (currently it is failing).

See the conversation and the code [here](https://github.com/skynetservices/skydns/commit/68df444eb3f7774cc9ee6283db815d91375df41d#commitcomment-5337449)

I have implemented the follow redirects behavior by updating the client's `base` attribute and retrying the same operation (this was simpler than other options and, since it is a 'moved permanently' response, looked reasonable)

If the approach on this PR is good, I can extend it to other write operations.

PS: I have built a test program for this, but I'm not sure how to write a test case in go.