docs: def _post(url, data, content_type, params=None):
          """HTTP POST request."""
          try:
              response = requests.post(url, params=params, data=data, headers={
                  'Content-Type': content_type,
              })
              response.raise_for_status()
              return response.json()
          except NameError:
              url = '{0}?{1}'.format(url, urllib.urlencode(params))
              req = urllib2.Request(url, data.encode(ENCODING), {
                  'Content-Type': content_type,
              })
              return json.loads(urllib2.urlopen(req).read().decode(ENCODING))