A customer has asked me to help them with their MAAS client. While implementing a very simple client I have noticed that MAAS almost always rejects the first request. When it does work it returns a Python pickled object. This ended up being because I was using python-requests which sets the default accept header to "*/*". If I set the accept header to "application/json" or even an empty string the request works.
MAAS should always return JSON when accept is set to */*
A customer has asked me to help them with their MAAS client. While implementing a very simple client I have noticed that MAAS almost always rejects the first request. When it does work it returns a Python pickled object. This ended up being because I was using python-requests which sets the default accept header to "*/*". If I set the accept header to "application/json" or even an empty string the request works.
MAAS should always return JSON when accept is set to */*