PUT the provided data as json to the specified path

        See :meth:`request` for additional details.
199157
def put_json(self, uri, data, **kwargs):
        
        encoded_data = json.dumps(data)
        kwargs.setdefault("headers", {}).update({
            "Content-Type": "application/json",  # tell server we are sending json
        })
        return self.put(uri, data=encoded_data, **kwargs)
1081796
def post(self, path, payload):
        """"""
        body = json.dumps(payload)
        return self._request(path, 'POST', body)
798256
def post_json(path, data = {})
      @request_uri = "#{@base_uri}#{path}" 
      body = JSON.generate(data)
      extheader = { 'Content-Type' => 'application/json' }
      req  = post_request(path, body, extheader)
      @res = http_connection.start {|http| http.request(req) }
      handle_error(@res, @request_uri)
      JSON.parse(@res.body)
    end
129030
def put(self, json=None):
        
        return self._call('put', url=self.endpoint, json=json)
565559
def get(self, path, params=None):
        """"""
        r = requests.get(url=self.url + path, params=params, timeout=self.timeout)
        r.raise_for_status()
        return r.json()
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
121301
def put(path, data = {}, header = {})
      _send(json_request(Net::HTTP::Patch, path, data, header))
    end
561582
def put(self, service, path, body, **kwargs):
        
        return self.make_request(Methods.POST, service, path, body=body,
                                 **kwargs)
325736
def post(path, data = {}, header = {})
      _send(json_request(Net::HTTP::Post, path, data, header))
    end
1127262
def write_json_to_file(path, data):
    
    with open(path, 'w', encoding='utf-8') as f:
        json.dump(data, f)
323076
def use_json(self, *paths):
        
        for path in paths:
            if path:
                fpath = os.path.expanduser(path)
                if os.path.exists(fpath):
                    with open(fpath) as fh:
                        provider = DictProvider(json.load(fh), name=path)
                        self.add(provider)
772764
def _put_obj(irods_path, obj):
    """"""
    text = json.dumps(obj, indent=2)
    _put_text(irods_path, text)
511157
def post(path, options={}, raw=false, unformatted=true)
      request(:post, path, options, raw, unformatted)
    end
1006706
def _put(self, url, data={}):
        """"""
        r = requests.put(self._api_prefix + url,
            data=json.dumps(data),
            headers=self.headers,
            auth=self.auth,
            allow_redirects=False,
        )
        return self._action(r)
1215484
def _request(self, path, method, body=None):
        """"""
        url = '/'.join([_SERVER, path])
        (resp, content) = _HTTP.request(url, method,
                                        headers=self._headers, body=body)

        content_type = resp.get('content-type')
        if content_type and content_type.startswith('application/json'):
            content = json.loads(content.decode('UTF-8'))

        return (resp, content)
81864
def post(self, path, data, is_json=True):
        ''''''
        post_data = {
            'client_id': self.client_id,
            'secret': self.secret,
        }
        post_data.update(data)
        return self._post(path, post_data, is_json)
272435
def load_json(path):
    
    try:
        with open(path, 'r') as json_file:
            return json.load(json_file)
    except (OSError, IOError):
        raise ClientException("File not found: {}".format(path))