Falcon v1.4.1 Documentationdescription = ('Sorry, couldn\'t write your thing to the ' 'database. It worked on my box.') raise falcon.HTTPError(falcon.HTTP_725, 'Database Error', description) class SinkAdapter(object): engines 'https://duckduckgo.com', 'y': 'https://search.yahoo.com/search', } def __call__(self, req, resp, engine): url = self.engines[engine] params = {'q': req.get_param('q', True)} result = requests.get(url, params=params) cluster that all data centers have to share. sink = SinkAdapter() app.add_sink(sink, r'/search/(?P<engine>ddg|y)\Z') # Useful for debugging problems in your API; works with pdb.set_trace(). You # can also0 码力 | 158 页 | 587.88 KB | 1 年前3
Falcon v1.4.0 Documentationdescription = ('Sorry, couldn\'t write your thing to the ' 'database. It worked on my box.') raise falcon.HTTPError(falcon.HTTP_725, 'Database Error', description) class SinkAdapter(object): engines 'https://duckduckgo.com', 'y': 'https://search.yahoo.com/search', } def __call__(self, req, resp, engine): url = self.engines[engine] params = {'q': req.get_param('q', True)} result = requests.get(url, params=params) cluster that all data centers have to share. sink = SinkAdapter() app.add_sink(sink, r'/search/(?P<engine>ddg|y)\Z') # Useful for debugging problems in your API; works with pdb.set_trace(). You # can also0 码力 | 156 页 | 573.94 KB | 1 年前3
Falcon v1.4.1 Documentationdescription = ('Sorry, couldn\'t write your thing to the ' 'database. It worked on my box.') raise falcon.HTTPError(falcon.HTTP_725, 'Database Error', description) class SinkAdapter(object): engines 'https://duckduckgo.com', 'y': 'https://search.yahoo.com/search', } def __call__(self, req, resp, engine): url = self.engines[engine] params = {'q': req.get_param('q', True)} result = requests.get(url, params=params) cluster that all data centers have to share. sink = SinkAdapter() app.add_sink(sink, r'/search/(?P<engine>ddg|y)\Z') # Useful for debugging problems in your API; works with pdb.set_trace(). You # can also0 码力 | 156 页 | 574.46 KB | 1 年前3
Falcon v2.0.0 Documentationdescription = ('Sorry, couldn\'t write your thing to the ' 'database. It worked on my box.') raise falcon.HTTPError(falcon.HTTP_725, 'Database Error', description) class SinkAdapter(object): engines 'https://duckduckgo.com', 'y': 'https://search.yahoo.com/search', } def __call__(self, req, resp, engine): url = self.engines[engine] params = {'q': req.get_param('q', True)} result = requests.get(url, params=params) cluster that all data centers have to share. sink = SinkAdapter() app.add_sink(sink, r'/search/(?P<engine>ddg|y)\Z') # Useful for debugging problems in your API; works with pdb.set_trace(). You # can also0 码力 | 184 页 | 671.87 KB | 1 年前3
Falcon v3.1.1-b3 Documentation'https://duckduckgo.com', 'y': 'https://search.yahoo.com/search', } def __call__(self, req, resp, engine): url = self.engines[engine] params = {'q': req.get_param('q', True)} result = requests.get(url, params=params) cluster that all data centers have to share. sink = SinkAdapter() app.add_sink(sink, r'/search/(?P<engine>ddg|y)\Z') # Useful for debugging problems in your API; works with pdb.set_trace(). You # can also Release 3.1.1b3 (continued from previous page) JSONTranslator.process_response • Sinks: /search/(?P<engine>ddg|y)\Z SinkAdapter • Error handlers: StorageError handle Note that this example requires the httpx0 码力 | 378 页 | 1.29 MB | 1 年前3
Falcon v3.1.1-b1 Documentation'https://duckduckgo.com', 'y': 'https://search.yahoo.com/search', } def __call__(self, req, resp, engine): url = self.engines[engine] params = {'q': req.get_param('q', True)} result = requests.get(url, params=params) cluster that all data centers have to share. sink = SinkAdapter() app.add_sink(sink, r'/search/(?P<engine>ddg|y)\Z') # Useful for debugging problems in your API; works with pdb.set_trace(). You # can also Release 3.1.1b1 (continued from previous page) JSONTranslator.process_response • Sinks: /search/(?P<engine>ddg|y)\Z SinkAdapter • Error handlers: StorageError handle Note that this example requires the httpx0 码力 | 378 页 | 1.29 MB | 1 年前3
Falcon v3.1.1-a Documentation'https://duckduckgo.com', 'y': 'https://search.yahoo.com/search', } def __call__(self, req, resp, engine): url = self.engines[engine] params = {'q': req.get_param('q', True)} result = requests.get(url, params=params) cluster that all data centers have to share. sink = SinkAdapter() app.add_sink(sink, r'/search/(?P<engine>ddg|y)\Z') # Useful for debugging problems in your API; works with pdb.set_trace(). You # can also Release 3.1.1 (continued from previous page) JSONTranslator.process_response • Sinks: /search/(?P<engine>ddg|y)\Z SinkAdapter • Error handlers: StorageError handle Note that this example requires the httpx0 码力 | 378 页 | 1.29 MB | 1 年前3
Falcon v3.1.0 Documentation'https://duckduckgo.com', 'y': 'https://search.yahoo.com/search', } def __call__(self, req, resp, engine): url = self.engines[engine] params = {'q': req.get_param('q', True)} result = requests.get(url, params=params) cluster that all data centers have to share. sink = SinkAdapter() app.add_sink(sink, r'/search/(?P<engine>ddg|y)\Z') # Useful for debugging problems in your API; works with pdb.set_trace(). You # can also Release 3.1.0 (continued from previous page) JSONTranslator.process_response • Sinks: /search/(?P<engine>ddg|y)\Z SinkAdapter • Error handlers: StorageError handle Note that this example requires the httpx0 码力 | 362 页 | 1.29 MB | 1 年前3
Falcon v3.1.1 Documentation'https://duckduckgo.com', 'y': 'https://search.yahoo.com/search', } def __call__(self, req, resp, engine): url = self.engines[engine] params = {'q': req.get_param('q', True)} result = requests.get(url, params=params) cluster that all data centers have to share. sink = SinkAdapter() app.add_sink(sink, r'/search/(?P<engine>ddg|y)\Z') # Useful for debugging problems in your API; works with pdb.set_trace(). You # can also Release 3.1.1 (continued from previous page) JSONTranslator.process_response • Sinks: /search/(?P<engine>ddg|y)\Z SinkAdapter • Error handlers: StorageError handle Note that this example requires the httpx0 码力 | 378 页 | 1.29 MB | 1 年前3
Falcon v3.1.1-rc1 Documentation'https://duckduckgo.com', 'y': 'https://search.yahoo.com/search', } def __call__(self, req, resp, engine): url = self.engines[engine] params = {'q': req.get_param('q', True)} result = requests.get(url, params=params) cluster that all data centers have to share. sink = SinkAdapter() app.add_sink(sink, r'/search/(?P<engine>ddg|y)\Z') # Useful for debugging problems in your API; works with pdb.set_trace(). You # can also Release 3.1.1rc1 (continued from previous page) JSONTranslator.process_response • Sinks: /search/(?P<engine>ddg|y)\Z SinkAdapter • Error handlers: StorageError handle Note that this example requires the httpx0 码力 | 378 页 | 1.29 MB | 1 年前3
共 40 条
- 1
- 2
- 3
- 4













