Post request

 @param [String] path
 @param [Object] obj
 @param [Hash] params
 @param [Hash] headers
 @return [Hash]
545688
def post(path, obj, params = {}, headers = {}, auth = true)
      request(http_method: :post, path: path, body: obj, query: params, headers: headers, auth: auth)
    end
333056
def post(path, body)
      LOG.debug("post #{body} to \"#{path}\"")
      response = @access_token.post(path, body)
      parse_response(response)
    end
1296271
def request_head(path, initheader = nil, &block)
      request(Head.new(path, initheader), &block)
    end
85103
def post(path, params)
      headers = {}

      request('POST', path, params.to_json, headers) do |resp|
        yield(resp) if block_given?
      end
    end
1069383
def post_with_auth(path, response_class, payload)
      response_class.new(client.post_with_auth(path, payload))
    end
1372332
def get(path, params = {})
      headers = request_headers(:get, path, params)
      request(:get, path, params, headers)
    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)
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
1118945
def post(payload = {})
      options={method: :post, 
        payload: payload, 
        headers:{content_type: :json, accept: :json}
      }
      run(options)
    end
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
47801
def get(path, query=nil, headers={})
      response = execute :get, path, query, headers
      hash = JSON.parse response.body
    end
357515
def post(path, options={})
      response = request(:post, path, options)

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

      response
    end
837638
def get(path, params = {}, header = {})
      _send(Net::HTTP::Get.new(expand_path(path, params), expand_header(header)))
    end
272761
def delete(path, options = {}, headers = {}, raw = false)
      request(:delete, path, options, headers, raw)
    end
13508
def _api_post(path, data, server=None):
    '''
    
    '''
    server = _get_server(server)
    response = requests.post(
            url=_get_url(server['ssl'], server['url'], server['port'], path),
            auth=_get_auth(server['user'], server['password']),
            headers=_get_headers(),
            data=salt.utils.json.dumps(data),
            verify=False
    )
    return _api_response(response)
954722
def post(body, path=nil)
      if header["Content-Type"] =~ /application\/(\w+[+])?json/
         chunk_save(path, "POST", body, param, header)
      else
        execute(
          request(path, :post, body, param, header)
        )
      end
    end
1285967
def post(path, data, options = {})
      uri = build_uri(path, options)

      request = Net::HTTP::Post.new(uri.request_uri)
      set_authorisation_header(request)
      request.set_form_data(data)

      response = https_client(uri).request(request)
    end