public function send()
    {
        $this->client->notifyPlugins('beforeRequest', [$this]);
        if (isset($this->options['async'])) {
            $async = $this->options['async'];
            if (is_bool($async)) {
                $async = var_export($async, true);
            }
            $this->headers['x-arango-async'] = $async;
        }

        if (isset($this->options['isBatchPart']) && $this->options['isBatchPart'] === true) {
            //            $this->isBatchPart = true;
            $this->address = $this->client->endpoint . $this->path;

            //todo: Revisit this:
            return true;
        } else {
            if (null !== $this->options && (!array_key_exists(
                        'isBatchRequest',
                        $this->options
                    ) || (isset($this->options['isBatchRequest']) && $this->options['isBatchRequest'] !== true))
            ) {
                $this->headers['Content-Type'] = 'application/json';
            }
            $this->address  = $this->client->endpoint . $this->path;
            $this->response = $this->client->connector->send($this);
        }

        return $this->client->doRequest($this);
    }
public function send()
    {
        $this->client->notifyPlugins('beforeRequest', [$this]);
        if (isset($this->options['async'])) {
            $async = $this->options['async'];
            if (is_bool($async)) {
                $async = var_export($async, true);
            }
            $this->headers['x-arango-async'] = $async;
        }

        if (isset($this->options['isBatchPart']) && $this->options['isBatchPart'] === true) {
            //            $this->isBatchPart = true;
            $this->address = $this->client->endpoint . $this->path;

            //todo: Revisit this:
            return true;
        } else {
            if (null !== $this->options && (!array_key_exists(
                        'isBatchRequest',
                        $this->options
                    ) || (isset($this->options['isBatchRequest']) && $this->options['isBatchRequest'] !== true))
            ) {
                $this->headers['Content-Type'] = 'application/json';
            }
            $this->address  = $this->client->endpoint . $this->path;
            $this->response = $this->client->connector->send($this);
        }

        return $this->client->doRequest($this);
    }
public function send ( ) { $ this -> client -> notifyPlugins ( 'beforeRequest' , [ $ this ] ) ; if ( isset ( $ this -> options [ 'async' ] ) ) { $ async = $ this -> options [ 'async' ] ; if ( is_bool ( $ async ) ) { $ async = var_export ( $ async , true ) ; } $ this -> headers [ 'x-arango-async' ] = $ async ; } if ( isset ( $ this -> options [ 'isBatchPart' ] ) && $ this -> options [ 'isBatchPart' ] === true ) { //            $this->isBatchPart = true; $ this -> address = $ this -> client -> endpoint . $ this -> path ; //todo: Revisit this: return true ; } else { if ( null !== $ this -> options && ( ! array_key_exists ( 'isBatchRequest' , $ this -> options ) || ( isset ( $ this -> options [ 'isBatchRequest' ] ) && $ this -> options [ 'isBatchRequest' ] !== true ) ) ) { $ this -> headers [ 'Content-Type' ] = 'application/json' ; } $ this -> address = $ this -> client -> endpoint . $ this -> path ; $ this -> response = $ this -> client -> connector -> send ( $ this ) ; } return $ this -> client -> doRequest ( $ this ) ; }
Method to send an HTTP request.
All request should be done through this method. Any async or batch handling is done within this method.

@return HttpResponseInterface Http Response object
Method to send an HTTP request . All request should be done through this method . Any async or batch handling is done within this method .