Performs the HTTP PUT request.
19201
def _http_put(self, url, data, **kwargs):
        

        kwargs.update({'data': json.dumps(data)})

        return self._http_request('put', url, kwargs)
703968
def put(self, request, id=None, **kwargs):
        
        if id:
            obj = get_object_or_404(self.queryset(request), id=id)
            if not self.has_update_permission(request, obj):
                return HttpResponseForbidden(_('You do not have permission to perform this action.'))
            else:
                return self.update_object(request, obj)
        else:
            # No putting on a collection.
            return HttpResponseForbidden()
1120448
def rest_put(url, data, timeout):
    ''''''
    try:
        response = requests.put(url, headers={'Accept': 'application/json', 'Content-Type': 'application/json'},\
                                data=data, timeout=timeout)
        return response
    except Exception as e:
        print('Get exception {0} when sending http put to url {1}'.format(str(e), url))
        return None
582206
def putRequest(self, request, block=True, timeout=0):
        """"""
        # don't reuse old work requests
        # print '\tthread pool putting work request %s'%request
        self._requests_queue.put(request, block, timeout)
        self.workRequests[request.requestID] = request
1168827
def put(self, url, data, headers=None):
        
        return self._request('PUT', url, data, headers=headers)
680433
async def api_put(self, url, data=None):
        """"""
        put = None
        headers = DEFAULT_HEADERS.copy()
        headers.update({'Session-Token': self._token})

        try:
            with async_timeout.timeout(DEFAULT_TIMEOUT, loop=self._event_loop):
                put = await self._api_session.put(
                    url, headers=headers, data=data)
            if put.status != 200:
                _LOGGER.error('Error putting Eight data: %s', put.status)
                return None

            if 'application/json' in put.headers['content-type']:
                put_result = await put.json()
            else:
                _LOGGER.debug('Response was not JSON, returning text.')
                put_result = await put.text()

            return put_result

        except (aiohttp.ClientError, asyncio.TimeoutError,
                ConnectionRefusedError) as err:
            _LOGGER.error('Error putting Eight data. %s', err)
            return None
1360737
def put(path, options={}, format=format)
      respond request(:put, path, options, format)
    end
731799
def _update(self, **kwargs):
        """"""
        path = self._construct_path_to_item()
        if not kwargs:
            return
        return self._http.put(path, json.dumps(kwargs))
591777
def do_PUT(self):
        
        self.do_initial_operations()
        payload = self.coap_uri.get_payload()
        if payload is None:
            logger.error("BAD PUT REQUEST")
            self.send_error(BAD_REQUEST)
            return
        logger.debug(payload)
        coap_response = self.client.put(self.coap_uri.path, payload)
        self.client.stop()
        logger.debug("Server response: %s", coap_response.pretty_print())
        self.set_http_response(coap_response)
1161959
protected function method_put()
	{
		$params = is_array($this->params) ? $this->encode($this->params) : $this->params;

		$this->set_option(CURLOPT_POSTFIELDS, $params);

		// Override method, I think this makes $_POST DELETE data but... we'll see eh?
		$this->set_header('X-HTTP-Method-Override', 'PUT');
	}
1368919
def rest_put(self, url, params=None, headers=None, auth=None, verify=True, cert=None):
        
        res = requests.put(url, params=params, headers=headers, auth=auth, verify=verify,
                           cert=cert)
        return res.text, res.status_code
725453
def put(self, path, payload):
        """"""
        body = json.dumps(payload)
        return self._request(path, 'PUT', body)
1000333
def put(self, endpoint, **kwargs):
        
        kwargs.update(self.kwargs.copy())
        if "data" in kwargs:
            kwargs["headers"].update(
                {"Content-Type": "application/json;charset=UTF-8"})
        response = requests.put(self.make_url(endpoint), **kwargs)
        return _decode_response(response)
380691
def do_put(self, uri, resource, timeout, custom_headers):
        
        self.validate_resource_uri(uri)

        task, body = self._connection.put(uri, resource, custom_headers=custom_headers)

        if not task:
            return body

        return self._task_monitor.wait_for_task(task, timeout)
548543
def put(path, token, query: {}, payload: {})
      request(:put, path, token, query, payload)
    end
1080632
public Response put(String restPath, Object payload, Map<String, String> queryParams) {
		LOG.debug("PUT: {}", restPath);
		return call(HttpMethod.PUT, restPath, Response.class, payload, queryParams);
	}
1283097
def put(self, request, uri):
        
        uri = self.decode_uri(uri)
        node = cio.publish(uri)

        if not node:
            raise Http404

        return self.render_to_json(node)