Post request

 @param [String] path
 @param [Object] obj
 @param [Hash] params
 @param [Hash] headers
 @return [Hash]
346724
def post(path, obj, params = {}, headers = {})
      request_headers = request_headers(headers)
      request_options = {
          path: path,
          headers: request_headers,
          body: encode_body(obj, request_headers['Content-Type']),
          query: encode_params(params)
      }
      response = http_client.post(request_options)
      if [200, 201].include?(response.status)
        parse_response(response)
      else
        handle_error_response(response)
      end
    end
379509
async def requests_post(self, path: str, **kwargs) -> ClientResponse:
        
        if 'self_' in kwargs:
            kwargs['self'] = kwargs.pop('self_')

        logging.debug("POST : {0}".format(kwargs))
        response = await self.connection_handler.session.post(
            self.reverse_url(self.connection_handler.http_scheme, path),
            data=kwargs,
            headers=self.headers,
            proxy=self.connection_handler.proxy,
            timeout=15
        )
        return response
67262
def post(self, path, data):
        
        LOGGER.debug('Posting data: %r', data)
        return self.session.post(self._request_url(path),
                                 data=json.dumps(data or {}),
                                 headers=self.HEADERS, auth=self.auth,
                                 verify=False)
1178958
public function post($path, $params)
    {
        $idempotencyKey = uniqid("", true);
        $paramsWithHeaders = array("headers" => array("Idempotency-Key" => $idempotencyKey));
        $params = array_replace_recursive($paramsWithHeaders, $params);

        $response = $this->http_client->request('POST', $path, $params);

        $this->handleErrors($response);
        return $response;
    }
1121321
function post($path = null, $postBody = null, $headers = null, $curlOpts = null) {
        $payload = $this -> encodePostBody($postBody);
        $this -> log -> debug("\n\n ====== Dump the payload before Http POST send! ====== \n\n$payload\n\n====== End Dump! ======\n");
        return $this -> request($path, self::HTTP_POST, $payload, $headers, $curlOpts);
    }
85336
def post(self, path, data, **options):
        
        data, options = self._update_request(data, options)
        return self.request('post', path, data=data, **options)
1893
def request(method, path, options, format)
      begin
        response = connection(format).send(method) do |request|
          case method.to_sym
          when :get, :delete
            request.url(formatted_path(path, format), options)
          when :post, :put
            request.path = formatted_path(path, format)
            request.body = options unless options.empty?
          end
      end
        'raw' == format.to_s.downcase ? response : response.body
      rescue MultiJson::DecodeError
        Hashie::Mash.new
      end
    end
85103
def post(path, params)
      headers = {}

      request('POST', path, params.to_json, headers) do |resp|
        yield(resp) if block_given?
      end
    end
1002736
def get(path,data={},headers=nil)
      data_to_query(data)
      if headers == nil
        response = @http.send_request('GET', path, @defaults[:data])
      else
        response = @http.send_request('GET', path, @defaults[:data], headers)
      end
      response
    end
591361
def post(path: nil, payload: nil, headers: {}, query: {})
      execute(method: :post, path: path, headers: headers, query: query, payload: payload)
    end
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
156673
def http_get(path, extra=nil, params={})
      payload = self.class.get path, params
      APICake::Payload.new payload
    end
1099783
def delete(path, params = {})
      headers = request_headers(:delete, path, params)
      request(:delete, path, params, headers)
    end
854495
def request(http_method, path, params)
      response = connection.send(http_method, path, params)
      response.body
    end
822541
def get(path, params = nil, headers = {})
      response = http_client.get(request_uri(path), params, request_headers(headers))
      if response.status == 200
        parse_response(response)
      else
        handle_error_response(response)
      end
    end
80355
def post_with_public_key(path, response_class, payload)
      response_class.new(client.post_with_public_key(path, payload))
    end
1226847
def object(path, api: ApiOptions::A0)
      node = get_node(path, _create = true)
      if node.object.nil? || node.object.api != api
        node.object = ProxyObject.new(
          @bus, @name, path,
          api: api
        )
      end
      node.object
    end