code: def _parse_response(response, post_request=False):
          
          data = response.json()
  
          if not response.ok:
              utils.error_message_and_exit('Push Api Error:', data)
  
          if post_request and not data['success']:
              raise Exception('Push Api Error: [%s]' % data['error'])
  
          return data
docs: Treat the response from ASApi.
  
          The json is dumped before checking the status as even if the response is
          not properly formed we are in trouble.
  
          TODO: Streamline error checking.