MCPcopy Index your code
hub / github.com/sqlmapproject/sqlmap / build

Method build

thirdparty/bottle/bottle.py:441–452  ·  view source on GitHub ↗

Build an URL by filling the wildcards in a rule.

(self, _name, *anons, **query)

Source from the content-addressed store, hash-verified

439 comborules.append((combined, rules))
440
441 def build(self, _name, *anons, **query):
442 """ Build an URL by filling the wildcards in a rule. """
443 builder = self.builder.get(_name)
444 if not builder:
445 raise RouteBuildError("No route with that name.", _name)
446 try:
447 for i, value in enumerate(anons):
448 query['anon%d' % i] = value
449 url = ''.join([f(query.pop(n)) if n else f for (n, f) in builder])
450 return url if not query else url + '?' + urlencode(query)
451 except KeyError as E:
452 raise RouteBuildError('Missing URL argument: %r' % E.args[0])
453
454 def match(self, environ):
455 """ Return a (target, url_args) tuple or raise HTTPError(400/404/405). """

Callers 2

addMethod · 0.95
get_urlMethod · 0.80

Calls 4

RouteBuildErrorClass · 0.85
urlencodeFunction · 0.50
getMethod · 0.45
popMethod · 0.45

Tested by

no test coverage detected