Make a HTTP POST request.

 @param path [String] The path, relative to api_endpoint
 @param options [Hash] body params for request
 @return [Hashie::Mash]
357515
def post(path, options={})
      response = request(:post, path, options)

      response.delete(:status) if response.respond_to?(:status)

      response
    end
1214796
def post_api url, params
        uri = URI.parse(url)
        http = Net::HTTP.new(uri.host, uri.port)
        http.use_ssl = self.secure
        form_params = params.to_query
        res = http.post(uri.request_uri, form_params)
        res.body
      end
132708
def request(http_method, path, body = '', headers = {})
      puts "#{http_method}: #{path} - [#{body}]" if @http_debug
      @request_client.request(http_method, path, body, headers)
    end
822816
def request(method, path, params, options)
      response = connection(options).run_request(method, nil, nil, nil) do |request|
        request.options[:raw] = true if options[:raw]
        case method.to_sym
        when :delete, :get
          request.url(path, params)
        when :post
          request.path = path
          request.body = params unless params.empty?
        end
      end
      options[:raw] ? response : response.body
    end
256112
def post(path, params = {})
      uri = URI.join(API_DOMAIN, path + "?access_token=#{token}")

      req = Net::HTTP::Post.new(uri)
      req.set_form_data(params)

      res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |https|
        https.request(req)
      end
      JSON.parse(res.body)
    end
953109
def post(self, path, data={}):
        ''' '''
        response = requests.post(API_URL + path, data=json.dumps(data), headers=self._set_headers())
        return self._check_response(response, self.post, path, data)
648180
def get(path, params = nil, headers = {})
      response = http_client.get(
        path: path,
        query: encode_params(params),
        headers: request_headers(headers)
      )
      if response.status == 200
        parse_response(response)
      else
        handle_error_response(response)
      end
    end
93570
def post(path, params={})
      signature_params = params.values.any?{|value| value.respond_to?(:to_io)} ? {} : params
      request(:post, path, params, signature_params)
    end
492103
def request(method, path, params={}, body=nil, headers={}, options={}, &block)
      options = { :mashify => true }.merge(options)
      req = http.build_request(method)
      req.path = path
      req.params.update(Util.clean_params(params)) if params
      req.body = body
      req.headers.update(headers) if headers
      block.call(req) if block
      logger.debug { Util.curl_format(req) }

      if @http_threadsafe
        env = req.to_env(http)
        check_response(http.app.call(env), options)
      else
        @request_mtx.synchronize {
          env = req.to_env(http)
          check_response(http.app.call(env), options)
        }
      end
    end
337846
def http_post(url, data)
    req = HTTPI::Request.new(:url => url, :body => data)
    return HTTPI.post(req).body
  end
999006
def call_api(http_method, path, opts = {})
      request = build_request(http_method, path, opts)
      response = request.run

      if @config.debugging
        @config.logger.debug "HTTP response body ~BEGIN~\n#{response.body}\n~END~\n"
      end

      unless response.success?
        if response.timed_out?
          fail ApiError.new('Connection timed out')
        elsif response.code == 0
          # Errors from libcurl will be made visible here
          fail ApiError.new(:code => 0,
                            :message => response.return_message)
        else
          exception_message = nil
          response_json = JSON.parse(response.body) rescue nil
          if response_json.is_a? Hash
            if response_json['errors'].is_a? Array
              response_errors = response_json['errors'].join(', ')
            elsif response_json['error']
              response_errors = response_json['error']
            end
            if response_errors
              exception_message = "#{response.status_message}: #{response_errors}"
            end
          end

          unless exception_message
            exception_message = "#{response.status_message}: [Could not parse errors from response body]"
          end

          fail ApiError.new(:code => response.code,
                            :response_headers => response.headers,
                            :response_body => response.body),
               exception_message
        end
      end

      if opts[:return_type]
        data = deserialize(response, opts[:return_type])
      else
        data = nil
      end
      return data, response.code, response.headers
    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
120494
def request(method, path, params, options)
      uri = options[:endpoint] || @endpoint
      uri = URI(uri) unless uri.respond_to?(:host)
      uri += path
      request_headers = {}
      params[:api_key] = @api_key unless @api_key.nil?

      if self.credentials?
        # When posting a file, don't sign any params
        signature_params = if [:post, :put].include?(method.to_sym) && params.values.any?{|value| value.is_a?(File) || (value.is_a?(Hash) && (value[:io].is_a?(IO) || value[:io].is_a?(StringIO)))}
          {}
        else
          params
        end
        authorization = SimpleOAuth::Header.new(method, uri, signature_params, credentials)
        request_headers[:authorization] = authorization.to_s.sub('OAuth', "Bearer")
      end
      connection.url_prefix = options[:endpoint] || @endpoint
      connection.run_request(method.to_sym, path, nil, request_headers) do |request|
        unless params.empty?
          case request.method
          when :post, :put
            request.body = params
          else
            request.params.update(params)
          end
        end
        yield request if block_given?
      end.env
    rescue Faraday::Error::ClientError
      raise ACTV::Error::ClientError
    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
919153
def post_json(path, object_to_post, response_type = nil)
      response_type = SimpleSolrClient::Response::GenericResponse if response_type.nil?
      response_type.new(_post_json(path, object_to_post))
    end
301610
def post_query(path, data = {})
      @request_uri = "#{@base_uri}#{path}" 
      body = URI.encode_www_form(data)
      extheader = { 'Content-Type' => 'application/x-www-form-urlencoded' }
      req  = post_request(path, body, extheader)
      @res = http_connection.start {|http| http.request(req) }
      handle_error(@res, @request_uri)
      JSON.parse(@res.body)
    end
32471
def upload(path, body, options={})
      options[:client_modified] = Time.now.utc.iso8601
      options[:path] = path
      resp = upload_request('/files/upload', body, options.merge(path: path))
      FileMetadata.new(resp)
    end