Send `post_dict` to the :attr:`.ALEPH_EXPORT_URL`.

    Args:
        post_dict (dict): dictionary from :class:`PostData.get_POST_data()`

    Returns:
        str: Reponse from webform.
577
def _sendPostDict(post_dict):
    
    downer = Downloader()
    downer.headers["Referer"] = settings.EDEPOSIT_EXPORT_REFERER
    data = downer.download(settings.ALEPH_EXPORT_URL, post=post_dict)
    rheaders = downer.response_headers

    error_msg = rheaders.get("aleph-info", "").lower().strip()
    if "aleph-info" in rheaders and error_msg.startswith("error"):
        raise ExportRejectedException(
            "Export request was rejected by import webform: %s" %
            rheaders["aleph-info"]
        )

    return data
1213546
def _post_data(options=None, xml=None):
    '''
    
    '''
    params = {'token': options['token'].strip(), 'cmd': 'submitcheck', 'XMLDATA': xml}

    res = salt.utils.http.query(
        url=options['url'],
        method='POST',
        params=params,
        data='',
        decode=True,
        status=True,
        header_dict={},
        opts=__opts__,
    )

    if res.get('status', None) == salt.ext.six.moves.http_client.OK:
        if res.get('dict', None) and isinstance(res['dict'], list):
            _content = res['dict'][0]
            if _content.get('status', None):
                return True
            else:
                return False
        else:
            log.error('No content returned from Nagios NRDP.')
            return False
    else:
        log.error(
            'Error returned from Nagios NRDP. Status code: %s.',
            res.status_code
        )
        return False
503029
def post_list(self, request, **kwargs):
        
        # The convert_post_to_VERB() technique is borrowed from
        # resources.py in tastypie source. This helps us to convert the POST
        # to a GET in the proper way internally.
        request.method = 'GET'  # override the incoming POST
        dispatch_request = convert_post_to_VERB(request, 'GET')
        return self.dispatch('list', dispatch_request, **kwargs)
30900
function postForm({ url, payload, useBearer }) {
  return ajax({
    url,
    body: makeFormData( payload ),
    method: 'post',
    useBearer
  })
}
18966
def _post_response(self, params):
        
        return self._session.post(
            self._api_url, data=params, timeout=self._timeout
        ).json(encoding="utf8")
1018789
def post(self, resource, data=None, json=None):
        
        return self.do(resource, 'POST', data=data, json=json)
1296598
def post(self, endpoint, json=None, params=None, **kwargs):
        
        json = kwargs['data'] if 'data' in kwargs else json
        return self._make_request('post', endpoint, data=json, params=params)
871594
def post_url(self, url, fields=None, headers=None, **urlopen_kw):
        
        return self.request_encode_body('POST', url, fields=fields,
                                        headers=headers,
                                        **urlopen_kw)
303097
def post(json_data,
         url,
         dry_run=False):
    

    if dry_run:
        info('POST: %s' % json.dumps(json_data, indent=4))
    else:
        response = SESSION.post(url,
                                data=json.dumps(json_data),
                                headers={'content-type': 'application/json'})

        if response.status_code != 200:
            raise Exception("Failed to import %s with %s: %s" %
                            (json_data, response.status_code, response.text))
371730
def post(self, url, data, charset=CHARSET_UTF8, headers={}):
        ''''''
        if 'Api-Lang' not in headers:
            headers['Api-Lang'] = 'python'
        if 'Content-Type' not in headers:
            headers['Content-Type'] = "application/x-www-form-urlencoded;charset=" + charset
        rsp = requests.post(url, data, headers=headers,
                            timeout=(int(self.conf(HTTP_CONN_TIMEOUT, '10')), int(self.conf(HTTP_SO_TIMEOUT, '30'))))
        return json.loads(rsp.text)
878741
def post(self, url, data):
        
        try:
            res = requests.post(
                url, headers=self.headers, data=json.dumps(data))
            return json.loads(res.text)
        except Exception as e:
            print(e)
            return "error"
313385
def post_command(self, sender, name, result, args, kwargs):
        
        return self._instance.post_command(
                   sender=self,
                   name=name,
                   result=result,
                   args=args,
                   kwargs=kwargs
               )
205424
def posted_data(self, field):
        
        try:
            return self.cleaned_data[field]
        except (AttributeError, KeyError):
            return field.endswith("_export")
226290
def post_json(url, **kwargs):
    
    if 'json' in kwargs:
        kwargs['data'] = unicode2utf8(value2json(kwargs['json']))
        del kwargs['json']
    elif 'data' in kwargs:
        kwargs['data'] = unicode2utf8(value2json(kwargs['data']))
    else:
        Log.error(u"Expecting `json` parameter")
    response = post(url, **kwargs)
    details = json2value(utf82unicode(response.content))
    if response.status_code not in [200, 201, 202]:

        if "template" in details:
            Log.error(u"Bad response code {{code}}", code=response.status_code, cause=Except.wrap(details))
        else:
            Log.error(u"Bad response code {{code}}\n{{details}}", code=response.status_code, details=details)
    else:
        return details
816519
def post(self, url: str, data: str, expected_status_code=201):
        
        r = requests.post(self._format_url(url), json=data, headers=self.headers, timeout=TIMEOUT)
        self._check_response(r, expected_status_code)

        return r.json()
300232
def post(self, url):
        
        return requests.post(url, data=self.data, headers=self.config.HEADERS)
1240374
def _post(self, *args, **kwargs):
        
        if 'data' in kwargs:
            kwargs['data'] = json.dumps(kwargs['data'])
        response = requests.post(*args, **kwargs)
        response.raise_for_status()