POST request wrapper for :func:`request()`
182124
def post(self, path, query=None, data=None, redirects=True):
        
        return self.request('POST', path, query, data, redirects)
956299
def post(self, request, *args, **kwargs):
        
        response = self.create(request, *args, **kwargs)
        response.data = None
        return response
1332881
def request(cls, method, url, **kwargs):
		
		methodupper = method.upper()
		hasdata = 'data' in kwargs
		if methodupper == 'GET':
			if hasdata:
				print("ERROR: Can't do HTTP GET when the 'data' parameter presents")
				assert False
			resp = ulr.urlopen(url, **kwargs)
		elif methodupper == 'POST':
			if hasdata:
				resp = ulr.urlopen(url, **kwargs)
			else:
				resp = ulr.urlopen(url, data = '', **kwargs)
		else:
			raise NotImplementedError()

		return resp
332287
def requests_post(url, data=None, json=None, **kwargs):
    """"""
    return requests_request('post', url, data=data, json=json, **kwargs)
585553
def post(url, req_hash={})
      res = nil
      res = perform_op(:post, req_hash) do
        res = @wrapper.post(url, req_hash)
      end
      return res
    end
297695
def post_request(url)
      do_request(url, Net::HTTP::Post) do |request|
        yield(request) if block_given?
      end
    end
429925
def post(self, request, *args, **kwargs):
        
        self.object_list = None
        form = self.get_xeditable_form(self.get_xeditable_form_class())
        if form.is_valid():
            obj = self.get_update_object(form)
            if obj is None:
                data = json.dumps({
                    'status': 'error',
                    'message': "Object does not exist."
                })
                return HttpResponse(data, content_type="application/json", status=404)
            return self.update_object(form, obj)
        else:
            data = json.dumps({
                'status': 'error',
                'message': "Invalid request",
                'form_errors': form.errors,
            })
            return HttpResponse(data, content_type="application/json", status=400)
1160240
def http_post_request(url, params, add_to_headers=None, _async=False):
    
    headers = {
        "Accept": "application/json",
        'Content-Type': 'application/json'
    }
    if add_to_headers:
        headers.update(add_to_headers)
    postdata = json.dumps(params)
    if _async:
        response = async_session.post(url, postdata, headers=headers, timeout=10)
        return response
    else:
        response = requests.post(url, postdata, headers=headers, timeout=10)
        try:

            if response.status_code == 200:
                return response.json()
            else:
                logger.debug(f'<POST>error_code:{response.status_code}  reason:{response.reason} detail:{response.text}')
                return
        except BaseException as e:
            logger.exception(
                f'<POST>httpPost failed, detail is:{response.text},{e}')
            return
545688
def post(path, obj, params = {}, headers = {}, auth = true)
      request(http_method: :post, path: path, body: obj, query: params, headers: headers, auth: auth)
    end
243223
def parse_request(self, request, parameters=None, fake_method=None):
        '''
        
        '''
        return (request.method,
                request.url,
                request.headers,
                request.POST.mixed())
213229
def _request(self, **kwargs):
        
        '''  '''
        
        response = None
        error = ''
        code = 0
        
    # send request
        from requests import request
        try:
            response = request(**kwargs)
        # handle response
            if self.handle_response:
                response, error, code = self.handle_response(response)
            else:
                code = response.status_code
    # handle errors
        except Exception as err:
            from requests import Request
            request_object = Request(**kwargs)
            try:
                request_details = self.handle_requests(request_object)
                error = request_details['error']
            except:
                error = str(err)
                
        return response, error, code
1350846
def post(self, request, bot_id, format=None):
        
        return super(HookList, self).post(request, bot_id, format)
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()
1374291
def _do_request(request):
    
    if request.request_type is RequestType.GET:
        return requests.get(request.url, headers=request.headers)
    if request.request_type is RequestType.POST:
        return requests.post(request.url, data=json.dumps(request.post_values), headers=request.headers)
    raise ValueError('Invalid request type {}'.format(request.request_type))
849615
def post(self, request, **kwargs):
        
        forms = self.get_forms()
        if self.are_forms_valid(forms):
            return self.forms_valid(forms)
        else:
            return self.forms_invalid(forms)
108047
def post(self, action, data=None, headers=None):
        
        return self.request(make_url(self.endpoint, action), method='POST', data=data,
                            headers=headers)
423607
def _request_api(self, **kwargs):
        
        _url = kwargs.get('url')
        _method = kwargs.get('method', 'GET')
        _status = kwargs.get('status', 200)

        counter = 0
        if _method not in ['GET', 'POST']:
            raise ValueError('Method is not GET or POST')

        while True:
            try:
                res = REQ[_method](_url, cookies=self._cookie)
                if res.status_code == _status:
                    break
                else:
                    raise BadStatusException(res.content)
            except requests.exceptions.BaseHTTPError:
                if counter < self._retries:
                    counter += 1
                    continue
                raise MaxRetryError
        self._last_result = res
        return res