Sets the request method to be according to the options.
{@see AbstractScraper.request}

@param  {!Object} options Request options.
@return {!Router} This router.
@public
356898
function(options) {
		var length = this.promises.length,
			last = this.promises[length - 1];
		if (length && last) {
			last.rqMethod = function(scraper, url) {
				options.uri = url;
				scraper.request(options);
			};
			return this;
		} else {
			throw new ScraperError('');
		}
	}
675209
public ServiceCall router(Router router) {
    ServiceCall target = new ServiceCall(this);
    target.router = router;
    return target;
  }
207122
function(options={}, callback=function(){}) {

    // Let all of our components always have referance to our router
    Component.prototype.router = this;

    // Save our config referance
    this.config = options;
    this.config.handlers = [];
    this.config.containers = [];

    // Normalize our url configs
    this.config.root = normalizeUrl(this.config.root);
    this.config.assetRoot = this.config.assetRoot ? normalizeUrl(this.config.assetRoot) : this.config.root;
    this.config.jsPath = normalizeUrl(this.config.assetRoot, this.config.jsPath);
    this.config.cssPath = normalizeUrl(this.config.assetRoot, this.config.cssPath);

    // Get a unique instance id for this router
    this.uid = $.uniqueId('router');

    // Allow user to override error route
    this.config.errorRoute && (ERROR_ROUTE_NAME = this.config.errorRoute);

    // Convert our routeMappings to regexps and push to our handlers
    _.each(this.config.routeMapping, function(value, route){
      var regex = this._routeToRegExp(route);
      this.config.handlers.unshift({ route: route, regex: regex, app: value });
    }, this);

    // Use the user provided container, or default to the closest `<main>` tag
    this.config.container = $((this.config.container || 'main'))[0];
    this.config.containers.push(this.config.container);
    SERVICES.page = new ServiceLoader('page');

    // Install our global components
    _.each(this.config.services, function(selector, route){
      var container = $(selector)[0] || document.createElement('span');
      this.config.containers.push(container);
      SERVICES[route] = new ServiceLoader(route);
      this._fetchResource(route, container).catch(function(){});
    }, this);

    // Watch click events on links in all out containers
    this._watchLinks(this.config.containers);

    // Start the history and call the provided callback
    Backbone.history.start({
      pushState: (this.config.pushState === undefined) ? true : this.config.pushState,
      root: (this.config.root || '')
    }).then(callback);

    return this;
  }
546901
def _options_request(self, url, **kwargs):
        
        '''  '''
        
    # construct request kwargs
        request_kwargs = {
            'method': 'OPTIONS',
            'url': url
        }
        for key, value in kwargs.items():
            request_kwargs[key] = value

    # send request and handle response
        return self._request(**request_kwargs)
123656
function Resource (options) {
    EventEmitter.call(this, { wildcard: true });

    options = options || {};

    this.method = options.method || 'get';
    this.route = options.route || '';
    this.middleware = [];
    this.properties = options.properties || {};

    return this;
}
843232
function(req,type,options){
  req.options = options
  req.options.type = type
  req.url = makeURL(options)
  req.validateResponse = validateResponse
  req.handleNetworkError = handleNetworkError
  P.promisifyAll(req,{multiArgs: true})
  return req
}
790972
function(path, contract) {
  if (!contract) {
    contract = path;
    path = '/';
  }

  if (contract.handle) {
    this.root.use(path, (req, res, next) => {
      contract.handle(req, res, next)
    });
  } else {
    this.root.use(path, contract);
  }
  return this;
}
1125193
function urlFromHttpRequestOptions(options, protocol) {
  var parsedPath = options.path.split('?');
  var pathname = parsedPath.shift();
  var search = parsedPath.join('?');

  var urlOptions = {
    protocol: protocol,
    hostname: options.hostname || options.host,
    auth: options.auth,
    port: options.port,
    pathname: pathname,
    search: search
  };

  return url.format(urlOptions);
}
315613
function WebRequest (options, callback) {
    request(options, function (err, response, body) {
        if (err) {
            return callback(err);
        }

        callback(null, body);
    });
}
830028
function (options) {
                var self = this;

                self._requestQueue = []

                self._socketOptions = angular.extend({}, _socketDefaults, options);

                self._socket = new TmpSocket();

                if (self._socketOptions.autoConnect) self.connect();
            }
237071
function defineRoute (server, opts) {

    server.route({
        method: 'GET',
        path: '/' + opts.plural,
        handler: handler,
        config: {
            jsonp: 'callback',
            validate: {
                query: {},
                payload: false
            }
        }
    });

    function handler (req) {
        var res = {};
        res[opts.plural] = opts.things;
        req.reply(res);
    }

}
423606
function Router(socket, options) {
  stream.Transform.call(this, { objectMode: true });

  this.options = merge(Object.create(Router.DEFAULTS), options || {});
  this.socket = socket;
}
1267533
function defineRoute (server, opts) {

    server.route({
        method: 'GET',
        path: '/',
        handler: handler,
        config: {
            jsonp: 'callback',
            validate: {
                query: {},
                payload: false
            }
        }
    });

    function handler (req) {
        var host = req.info.host;
        req.reply({
            endpoints: [
                {
                    method: 'GET',
                    endpoint: '/' + opts.plural,
                    description: 'Get all ' + opts.plural,
                    example: 'http://' + host + '/' + opts.plural
                },
                {
                    method: 'GET',
                    endpoint: '/random',
                    description: 'Get a random ' + opts.singular,
                    example: 'http://' + host + '/random'
                },
                {
                    method: 'GET',
                    endpoint: '/bomb?count={n}',
                    description: 'Get multiple random ' + opts.plural,
                    example: 'http://' + host + '/bomb?count=3'
                },
                {
                    method: 'GET',
                    endpoint: '/count',
                    description: 'Get the number of available ' + opts.plural,
                    example: 'http://' + host + '/count'
                }
            ]   
        });
    }

}
208953
public Router options(@NotNull final Pattern regex, @NotNull final IMiddleware... handlers) {
        addRegEx("OPTIONS", regex, handlers, optionsBindings);
        return this;
    }
906129
function Request(Safe, uri, method) {
  if (!this)
    return new Request(Safe, uri, method);

  this.Safe = Safe;
  this.uri = uri;
  this.method = method;
  this._needAuth = false;
  this._returnMeta = false;
}
581701
function(serverUrl) {
  var parsedUrl = url.parse(serverUrl);
  if (!parsedUrl.hostname) {
    throw new Error('Invalid server URL: ' + serverUrl);
  }

  /**
   * Base options for each request.
   * @private {!Object}
   */
  this.options_ = {
    host: parsedUrl.hostname,
    path: parsedUrl.pathname,
    port: parsedUrl.port
  };
}
211335
public Request option(String key, Object value) {
        this.options.put(key, value);
        return this;
    }