Default callback for OPTIONS request
        :rtype: Response
328690
def default_route_options():
        
        response_obj = OrderedDict()

        response_obj["status"] = True
        response_obj["data"] = "Ok"

        return Response(response_obj, content_type="application/json", charset="utf-8")
869177
function(options,done) {

    request(options, function (err, response, payload) {
        if (err) {
            console.log('api call error');
            console.log(err);
        }

        done(err, payload, parseRateLimits(response.headers));
    });
}
154081
function(options) {
        if (this.response && !(options && options.noAbort === true)) {
            this.layer.protocol.abort(this.response);
            this.layer.events.triggerEvent("loadend");
        }
        var evt = {filter: this.createFilter()};
        this.layer.events.triggerEvent("loadstart", evt);
        this.response = this.layer.protocol.read(
            OpenLayers.Util.applyDefaults({
                filter: evt.filter,
                callback: this.merge,
                scope: this
        }, options));
    }
1295839
function (options, callback) {
    var self = this,
        requestOptions = {
          path: _urlPrefix
    };

    if (typeof options === 'function') {
      callback = options;
      options = {};
    }

    self._request(requestOptions, function (err, body) {
      if (err) {
        return callback(err);
      }

      else if (!body || !body.loadBalancers) {
        return callback(new Error('Unexpected empty response'));
      }

      else {
        return callback(null, body.loadBalancers.map(function (loadBalancer) {
          return new lb.LoadBalancer(self, loadBalancer);
        }));
      }
    });
  }
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)
698102
def call(request, options)
      response = begin
        @http.request(request)
      rescue Exception => e
        Error.new(OPEN_HTTP_TRANSLATE_ERROR, "#{e.message}\n#{e.backtrace.inspect}", options[:format])
      end
      
      return response.body if options[:raw] || options[:format] == 'xml'

      OpenStruct.new( JSON.parse(response.body) )
    end
104428
def options
      opts    = fetch('options', {})
      headers = fetch('headers', {})
      if value = accept
        headers[:accept] = value
      end
      opts[:raw]     = key?('raw') ? self['raw'] : false
      opts[:headers] = headers unless headers.empty?
      opts
    end
103574
def options(self):

		'''
		
		'''

		# http request
		response = self.repo.api.http_request('OPTIONS', self.uri)
		return response.headers
67981
def _options_form_default(self):
        '''
        
        '''
        if not self.profile_list:
            return ''
        if callable(self.profile_list):
            return self._render_options_form_dynamically
        else:
            return self._render_options_form(self.profile_list)
277981
public void handleOptions(HttpServletRequest request, HttpServletResponse response) throws IOException
    {
        // Handle OPTIONS request for entire server
        // 9.2
        response.setIntHeader(HttpFields.__ContentLength, 0);
        response.setHeader(HttpFields.__Allow, _AllowString);
        response.flushBuffer();
    }
12434
def get_response_handler(self):
        
        assert self.response_handler is not None, \
            'Please define a response_handler ' \
            ' for Endpoint: %s' % self.__class__.__name__

        return self.response_handler(self, **self.get_response_handler_params())
133273
def response(self, callback=None):
        
        if not callback:
            callback = type(self).AdvancedJsonify
        resp = {
            "status": "error",
            "message": self.message
        }
        if self.step:
            resp["step"] = self.step

        self.LOGGER.error(self.message, extra={"step": self.step, "context": self.context})
        return callback(resp, status_code=self.code)
592163
function(options){
  
  // Set the default options
  this.appKey = '';
  this.environment = 'integration';
  this.redirectUri = '';
  this.tokenCookie = 'FS_AUTH_TOKEN';
  this.maxThrottledRetries = 10;
  this.saveAccessToken = false;
  this.accessToken = '';
  this.jwt = '';
  this.middleware = {
    request: [
      requestMiddleware.url,
      requestMiddleware.defaultAcceptHeader,
      requestMiddleware.authorizationHeader, 
      requestMiddleware.disableAutomaticRedirects, 
      requestMiddleware.body
    ],
    response: [
      responseMiddleware.redirect, 
      responseMiddleware.throttling, 
      responseMiddleware.json
    ]
  };
  
  // Process options
  this.config(options);
}
61061
def call(self, default_response=None, **query_params):
        
        query_url = self.get_query_url(**query_params)
        return self._perform_call(query_url, default_response)
1039652
def handle_response(defopts, res)
      raise NetError.new(res.body)  unless res.code == '200'

      json = Yajl::Parser.parse(res.body)
      RegApi2.got_response(json)

      raise ApiError.from_json(json)  if json['result'] == 'error'

      res_contract = RegApi2::ResultContract.new(defopts)
      res_contract.handle_result(json)
    end
627110
def options(self, request, *args, **kwargs):
        
        if self.metadata_class is None:
            return self.http_method_not_allowed(request, *args, **kwargs)
        data = self.metadata_class().determine_metadata(request, self)
        return Response(data, status=status.HTTP_200_OK)
1072486
def request(method, *options)
      response_handler = if options.last.is_a?(Hash) && options.last[:handler]
                           options.last.delete(:handler)
                         else
                           handler
                         end

      self.class.base_uri Jiralicious.uri
      before_request if respond_to?(:before_request)
      response = self.class.send(method, *options)
      after_request(response) if respond_to?(:after_request)

      response_handler.call(response)
    end