Wrapper for the HTTP PUT request.
325473
def _put(self, url, attributes=None, **kwargs):
        

        return self._request('put', url, attributes, **kwargs)
949365
def _request(self, method, url, params=None, headers=None, data=None):
        """"""
        if not params:
            params = {}

        # set default headers
        if not headers:
            headers = {
                'accept': '*/*'
            }
            if method == 'POST' or method == 'PUT':
                headers.update({'Content-Type': 'application/json'})
        try:
            response = requests.request(method=method, url=self.host + self.key + url, params=params,
                                        headers=headers, data=data)

            try:
                response.raise_for_status()

                response_code = response.status_code
                success = True if response_code // 100 == 2 else False
                if response.text:
                    try:
                        data = response.json()
                    except ValueError:
                        data = response.content
                else:
                    data = ''

                response_headers = response.headers

                return BurpResponse(success=success, response_code=response_code, data=data,
                                    response_headers=response_headers)
            except ValueError as e:
                return BurpResponse(success=False, message="JSON response could not be decoded {}.".format(e))
            except requests.exceptions.HTTPError as e:
                if response.status_code == 400:
                    return BurpResponse(success=False, response_code=400, message='Bad Request')
                else:
                    return BurpResponse(
                        message='There was an error while handling the request. {}'.format(response.content),
                        success=False)
        except Exception as e:
            return BurpResponse(success=False, message='Eerror is %s' % e)
721219
def add_put(self, *args, **kwargs):
        
        return self.add_route(hdrs.METH_PUT, *args, **kwargs)
134333
def on_put(self, req, resp, **kwargs):
        """"""
        validated = self.require_validated(req)
        return super().on_put(
            req, resp,
            handler=partial(self._update, validated=validated),
            **kwargs
        )
1174719
def put(self, request, bot_id, id, format=None):
              
        return super(HandlerDetail, self).put(request, bot_id, id, format)
210479
def put(path: nil, payload:, headers: {}, query: {})
      execute(method: :put, path: path, headers: headers, query: query, payload: payload)
    end
888842
def _put(self, uri, data):
        
        headers = self._get_headers()

        logging.debug("URI=" + str(uri))
        logging.debug("BODY=" + json.dumps(data))

        response = self.session.put(uri, headers=headers,
                data=json.dumps(data))
        if response.status_code in [201, 204]:
            return data
        else:
            logging.error(response.content)
            response.raise_for_status()
49783
def put(self, request, **resources):
        
        if not self._meta.form:
            return None

        if not self._meta.name in resources or not resources[self._meta.name]:
            raise HttpError(
                "Resource not found.", status=status.HTTP_404_NOT_FOUND)
        resource = resources.pop(self._meta.name)

        updated = UpdatedList()
        for o in as_tuple(resource):
            form = self._meta.form(data=request.data, instance=o, **resources)

            if not form.is_valid():
                raise FormError(form)

            updated.append(form.save())

        return updated if len(updated) > 1 else updated[-1]
743382
def _rest_put(self, suburi, request_headers, request_body):
        
        return self._rest_op('PUT', suburi, request_headers, request_body)
1341210
def put(path, options={}, raw=false, unformatted=true)
      request(:put, path, options, raw, unformatted)
    end
886553
def put(url, payload)
      data = payload.to_json
      response = Curl::Easy.http_put(url, data) do |curl| 
        curl.headers["Content-Type"] = "application/json"
        curl.on_failure do |response, err|
          RHapi::ConnectionError.raise_error("#{response.response_code}\n Error is: #{err.inspect}")
        end
      end
      RHapi::ConnectionError.raise_error(response.header_str) unless response.header_str =~ /2\d\d/
    end
129030
def put(self, json=None):
        
        return self._call('put', url=self.endpoint, json=json)
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)
386222
def put(self, request, bot_id, id, format=None):
              
        return super(HookDetail, self).put(request, bot_id, id, format)
983652
def put(self, request, *args, **kwargs):
        
        with reversion.create_revision():
            reversion.set_user(request.user)
            reversion.set_comment('changed through the RESTful API from ip %s' % request.META['REMOTE_ADDR'])
            return self.update(request, *args, **kwargs)
20157
async def put(self, request, resource=None, **kwargs):
        
        if resource is None:
            raise RESTNotFound(reason='Resource not found')

        return await self.post(request, resource=resource, **kwargs)
217193
def put(self, uri_relative, request_bytes, custom_headers):
        

        return self._request(
            self._METHOD_PUT,
            uri_relative,
            request_bytes,
            {},
            custom_headers
        )