Handles the HTTP GET request.

        Interpret all HTTP GET requests as requests for server
        documentation.
19353
def handle_get(self):
        

        response = self.generate_html_documentation().encode('utf-8')

        print('Content-Type: text/html')
        print('Content-Length: %d' % len(response))
        print()
        sys.stdout.flush()
        sys.stdout.buffer.write(response)
        sys.stdout.buffer.flush()
1282278
def _get(self, *args, **kwargs):
        
        return self._request(requests.get, *args, **kwargs)
1085104
def handle(self, request: HttpRequest) -> HttpResponse:
        
        self.__request_start = datetime.now()
        self.__request = request
        self.__uri = request.path[1:]
        self.__method = request.method

        # Initializes the callable controller and call it's connect method to get the mapped end-points.
        controller: RouteMapping = self.__controller().connect(self.app)

        self.__end_points = controller.get_routes()

        indent = self.get_json_ident(request.META)

        if self.set_end_point_uri() is False:
            return self.set_response_headers(self.no_route_found(self.__request).render(indent))

        response = HttpResponse(None)
        try:
            response = self.exec_route_callback()
        except RinzlerHttpException as e:
            client.captureException()
            self.app.log.error(f"< {e.status_code}", exc_info=True)
            response = Response(None, status=e.status_code)
        except RequestDataTooBig:
            client.captureException()
            self.app.log.error("< 413", exc_info=True)
            response = Response(None, status=413)
        except BaseException:
            client.captureException()
            self.app.log.error("< 500", exc_info=True)
            response = Response(None, status=500)
        finally:
            if type(response) == Response:
                return self.set_response_headers(response.render(indent))
            else:
                return self.set_response_headers(response)
582970
def do_get(self, line):
        

        def f(p, args):
            print(p.get())

        self._request(line, f)
378790
def do_get(endpoint, access_token):
    '''
    '''
    headers = {"Authorization": 'Bearer ' + access_token}
    headers['User-Agent'] = get_user_agent()
    return requests.get(endpoint, headers=headers).json()
423393
def do_get(url, params, to=3):
    
    try:
        rs = requests.get(url, params=params, timeout=to)
        if rs.status_code == 200:
            try:
                return rs.json()
            except Exception as __e:
                # log.error(__e)
                return rs.text
    except Exception as er:
        log.error('get {} ({}) with err: {}'.format(url, params, er))
        time.sleep(0.5)
    return {}
1196864
def handle(self, url, method):
        
        if not self.serve:
            return HTTPError(503, "Server stopped")

        handler, args = self.match_url(url, method)
        if not handler:
            return HTTPError(404, "Not found:" + url)

        try:
            return handler(**args)
        except HTTPResponse, e:
            return e
        except Exception, e:
            if isinstance(e, (KeyboardInterrupt, SystemExit, MemoryError))\
            or not self.catchall:
                raise
            return HTTPError(500, 'Unhandled exception', e, format_exc(10))
776968
def handle_get(self):
        

        code = 400
        message, explain = \
                 BaseHTTPServer.BaseHTTPRequestHandler.responses[code]

        response = BaseHTTPServer.DEFAULT_ERROR_MESSAGE % { #@UndefinedVariable
             'code' : code,
             'message' : message,
             'explain' : explain
            }
        sys.stdout.write('Status: %d %s\n' % (code, message))
        sys.stdout.write('Content-Type: text/html\n')
        sys.stdout.write('Content-Length: %d\n' % len(response))
        sys.stdout.write('\n')

        sys.stdout.write(response)
72304
def do_GET(req, res)
      res.status, res.content_type, res.body = @delegator.run(req.meta_vars)
    end
937823
def handle_response(response):
    

    # ignore valid responses
    if response.status_code < 400:
        return

    cls = _status_to_exception_type.get(response.status_code, HttpError)

    kwargs = {
        'code': response.status_code,
        'method': response.request.method,
        'url': response.request.url,
        'details': response.text,
    }

    if response.headers and 'retry-after' in response.headers:
        kwargs['retry_after'] = response.headers.get('retry-after')

    raise cls(**kwargs)
1119636
def render_GET(self, request):
        """"""
        if not request.args:
            request.setHeader("Content-Type", "text/plain")
            return self.get_status_text()
        else:
            self.handle(request)
            return NOT_DONE_YET
777786
def handle_request(self, req):
        
        req.start_time = time()
        handler = None
        try:
            version, account, user, _junk = split_path(req.path_info,
                minsegs=0, maxsegs=4, rest_with_last=True)
        except ValueError:
            return HTTPNotFound(request=req)
        if version in ('v1', 'v1.0', 'auth'):
            if req.method == 'GET':
                handler = self.handle_get_token
        elif version == 'v2':
            if not self.super_admin_key:
                return HTTPNotFound(request=req)
            req.path_info_pop()
            if req.method == 'GET':
                if not account and not user:
                    handler = self.handle_get_reseller
                elif account:
                    if not user:
                        handler = self.handle_get_account
                    elif account == '.token':
                        req.path_info_pop()
                        handler = self.handle_validate_token
                    else:
                        handler = self.handle_get_user
            elif req.method == 'PUT':
                if not user:
                    handler = self.handle_put_account
                else:
                    handler = self.handle_put_user
            elif req.method == 'DELETE':
                if not user:
                    handler = self.handle_delete_account
                else:
                    handler = self.handle_delete_user
            elif req.method == 'POST':
                if account == '.prep':
                    handler = self.handle_prep
                elif user == '.services':
                    handler = self.handle_set_services
        else:
            handler = self.handle_webadmin
        if not handler:
            req.response = HTTPBadRequest(request=req)
        else:
            req.response = handler(req)
        return req.response
1099958
protected function handleGET()
    {
        $scriptable = $this->request->getParameterAsBool('scriptable');

        \Log::info('Building event map');

        $eventMap = [];
        if (!empty($serviceName = $this->request->getParameter('service'))) {
            if (Session::allowsServiceAccess($serviceName)) {
                try {
                    if (!empty($service = ServiceManager::getService($serviceName))) {
                        if (!empty($map = $service->getEventMap())) {
                            $eventMap[$serviceName] = $map;
                        }
                    }
                } catch (\Exception $ex) {
                    Log::info("Failed to build event map for service $serviceName. {$ex->getMessage()}");
                }
            }
        } else {
            foreach (ServiceManager::getServiceNames() as $serviceName) {
                if (Session::allowsServiceAccess($serviceName)) {
                    try {
                        if (!empty($service = ServiceManager::getService($serviceName))) {
                            if (!empty($map = $service->getEventMap())) {
                                $eventMap[$serviceName] = $map;
                            }
                        }
                    } catch (\Exception $ex) {
                        Log::info("Failed to build event map for service $serviceName. {$ex->getMessage()}");
                    }
                }
            }
        }

        \Log::info('Event map build process complete');

        $allEvents = [];
        foreach ($eventMap as $serviceKey => $paths) {
            foreach ($paths as $path => $operations) {
                if (empty($type = array_get($operations, 'type'))) {
                    $type = 'service';
                    $eventMap[$serviceKey][$path]['type'] = $type;
                }
                if (!empty($endpoints = (array)array_get($operations, 'endpoints', $path))) {
                    if ($scriptable) {
                        $temp = [];
                        foreach ($endpoints as $endpoint) {
                            $temp[] = $endpoint;
                            switch ($type) {
                                case 'api':
                                    // add pre_process, post_process
                                    $temp[] = "$endpoint.pre_process";
                                    $temp[] = "$endpoint.post_process";
                                    break;
                                case 'service':
                                    break;
                            }
                            // add queued
                            $temp[] = "$endpoint.queued";
                        }
                        $endpoints = $temp;
                        $eventMap[$serviceKey][$path]['endpoints'] = $temp;
                    }
                    $allEvents = array_merge($allEvents, $endpoints);
                }
            }
        }

        if (!$this->request->getParameterAsBool(ApiOptions::AS_LIST)) {
            return $eventMap;
        }

        return ResourcesWrapper::cleanResources(array_values(array_unique($allEvents)));
    }
24288
def _handle_get(self, request):
        # type: (Get) -> CallbackResponses
        """"""
        data = self._block

        for i, endpoint in enumerate(request.path[1:]):
            try:
                data = data[endpoint]
            except KeyError:
                if hasattr(data, "typeid"):
                    typ = data.typeid
                else:
                    typ = type(data)
                raise UnexpectedError(
                    "Object %s of type %r has no attribute %r" % (
                        request.path[:i+1], typ, endpoint))
        # Important to serialize now with the lock so we get a consistent set
        serialized = serialize_object(data)
        ret = [request.return_response(serialized)]
        return ret
296872
def _get_request(self, url, params=None, **kwargs):
        
        '''  '''
        
    # construct request kwargs
        request_kwargs = {
            'method': 'GET',
            'url': url,
            'params': params
        }
        for key, value in kwargs.items():
            request_kwargs[key] = value

    # send request and handle response
        return self._request(**request_kwargs)
596684
def get(self, request, *args, **kwargs):
        
        # initialize class parameters
        self.init_get(request)
        # process the GET request
        self.process_get()
        # call the GET/POST common part
        return self.common()
974756
def get(self, url, data=None):
        
        response = self.http.get(url,
                                 headers=self.headers,
                                 params=data,
                                 **self.requests_params)
        return self.process(response)