Send request _data_.
760103
function(data) {
      var self = this
      this.data = data
      this.readyState = 4
      if (this.method == 'HEAD') this.responseText = null
      this.responseHeaders['content-length'] = (this.responseText || '').length
      if(this.async) this.onreadystatechange()
      lastRequest = function(){
        return self
      }
    }
935167
def send(self, data):
        """"""
        # send message
        _LOGGER.debug("send: " + data)
        self.socket.send(data.encode('ascii'))
        # sleep needed to prevent flooding the GC100 with sends
        sleep(.01)
1320534
def send_request(input_data, api, url, headers, kwargs):
    
    data = {}
    if input_data != None:
        data['data'] = input_data

    # request that the API respond with a msgpack encoded result
    serializer = kwargs.pop("serializer", config.serializer)
    data['serializer'] = serializer

    data.update(**kwargs)

    json_data = json.dumps(data)

    response = requests.post(url, data=json_data, headers=headers)

    warning = response.headers.get('x-warning')
    if warning:
        warnings.warn(warning)

    cloud = urlparse(url).hostname
    if response.status_code == 503 and not cloud.endswith('.indico.io'):
        raise APIDoesNotExist("Private cloud '%s' does not include api '%s'" % (cloud, api))

    try:
        if serializer == 'msgpack':
            json_results = msgpack.unpackb(response.content)
        else:
            json_results = response.json()
    except (msgpack.exceptions.UnpackException, msgpack.exceptions.ExtraData):
        try:
            json_results = response.json()
        except:
            json_results = {"error": response.text}


    if config.PY3:
        json_results = convert(json_results)

    results = json_results.get('results', False)
    if results is False:
        error = json_results.get('error')
        raise convert_to_py_error(error)
    return results
195518
function send(data) {
                verifyState(this);

                if (!/^(get|head)$/i.test(this.method)) {
                    var contentType = getHeader(this.requestHeaders, "Content-Type");
                    if (this.requestHeaders[contentType]) {
                        var value = this.requestHeaders[contentType].split(";");
                        this.requestHeaders[contentType] = value[0] + ";charset=utf-8";
                    } else if (!(data instanceof FormData)) {
                        this.requestHeaders["Content-Type"] = "text/plain;charset=utf-8";
                    }

                    this.requestBody = data;
                }

                this.errorFlag = false;
                this.sendFlag = this.async;
                this.readyStateChange(FakeXMLHttpRequest.OPENED);

                if (typeof this.onSend == "function") {
                    this.onSend(this);
                }

                this.dispatchEvent(new sinon.Event("loadstart", false, false, this));
            }
1120484
def send(self, data):
        
        if self.readyState != 'open':
            raise InvalidStateError

        if not isinstance(data, (str, bytes)):
            raise ValueError('Cannot send unsupported data type: %s' % type(data))

        self.transport._data_channel_send(self, data)
1244744
def _send_query(self, do_post=False, **query_dict):
        """"""
        # self._prepare_query_term()
        param_dict = query_dict.copy()
        param_dict.setdefault('wt', 'json')
        param_dict.setdefault('q', '*.*')
        param_dict.setdefault('fl', '*')
        return self.query('solr', '', do_post=do_post, query=param_dict)
935210
async def _send(self, request_bytes, body_bytes, h11_connection):
        '''
        
        '''
        await self.sock.send_all(h11_connection.send(request_bytes))
        if body_bytes is not None:
            await self.sock.send_all(h11_connection.send(body_bytes))
        await self.sock.send_all(h11_connection.send(h11.EndOfMessage()))
295543
def _send(data):
    
    url = data.get('url', CLOWDER_API_URL)

    _validate_data(data)

    if api_key is not None:
        data['api_key'] = api_key

    if 'value' not in data:
        data['value'] = data.get('status', 1)

    if 'frequency' in data:
        data['frequency'] = _clean_frequency(data['frequency'])

    try:
        requests.post(url, data=data, timeout=TIMEOUT).text

    # This confirms you that the request has reached server
    # And that the request has been sent
    # Because we don't care about the response, we set the timeout
    # value to be low and ignore read exceptions
    except requests.exceptions.ReadTimeout as err:
        pass

    # Allow a wildcard expection for any other type of processing error
    except requests.exceptions.RequestException as err:
        logging.error('Clowder expection %s', err)
919124
def send(self, request, **kwargs):
        
        if len(request.url) > self.MAX_URL_LENGTH:
            raise URITooLong(
                message=(
                    'Request url too large, '
                    'likely too many query parameters provided.'
                )
            )
        return super(RequestSession, self).send(request, **kwargs)
1203270
private function send_request() {
        // check if stream is declared to be open
        // only logical check we are not sure if socket is really still open ...
        if ($this->_connection_closed) {
            // reopen it
            // be sure to close the open socket.
            $this->close();
            $this->reopen();
        }

        // convert array to string
        $buffer = implode("\r\n", $this->_req);
        $buffer .= "\r\n\r\n";
        $this->_error_log($buffer);
        fputs($this->sock, $buffer);
    }
1368529
async def _request(
            self,
            method: str,
            url: str,
            *,
            headers: dict = None,
            params: dict = None,
            json: dict = None) -> dict:
        """"""
        if not headers:
            headers = {}

        try:
            async with self._websession.request(method, url, headers=headers,
                                                params=params,
                                                json=json) as resp:
                resp.raise_for_status()
                data = await resp.json(content_type=None)
                return data
        except ClientError as err:
            raise RequestError(
                'Error requesting data from {}: {}'.format(url, err))
801062
def sendRequest(self, name, args):
        """"""
        (respEvt, id) = self.newResponseEvent()
        self.sendMessage({"id":id, "method":name, "params": args})
        return respEvt
413972
def write(self, data):
        """"""
        self.request(
            url="write",
            method='POST',
            params=None,
            data=data,
            expected_response_code=200
        )
        return True
925683
def post(self, url, data=None, **kwargs):
        """"""
        return requests.post(url, data=data, headers=self.add_headers(**kwargs))
877550
def send(self, request):
        
        self._connection.connection.rpush(self._request_key, pickle.dumps(request))
        resp_key = '{}:{}'.format(SIGNAL_REDIS_PREFIX, request.uid)

        while True:
            if self._connection.polling_time > 0.0:
                sleep(self._connection.polling_time)

            response_data = self._connection.connection.get(resp_key)
            if response_data is not None:
                self._connection.connection.delete(resp_key)
                break

        return pickle.loads(response_data)
133917
def send(self):
        
        web.ctx.status = _convert_http_status(self.status_code)
        return _api_convert_output(self.return_value)
414435
public function send()
    {
        $data = $this->parseDataToString($this->data);
        $format = $this->allowedFormats[$this->format];

        // Send status header
        header($this->getStatus(), true, $this->getStatus());

        foreach(self::$headers as $key => $value) {
            header($key.": ".$value);
        }

        // Send content type header
        header("Content-Type: ".$format['mimetype']."; charset=utf-8");

		// Set content length header
		header("Content-Length: ".strlen($data));

        if(function_exists("ginger_log")) {
            ginger_log($this);
        }

        echo $data;

        die();
    }