Skip to content

Commit 6249003

Browse files
author
Vladimir Kotal
committed
add doc string
1 parent 037ba99 commit 6249003

File tree

1 file changed

+9
-0
lines changed
  • opengrok-tools/src/main/python/opengrok_tools/utils

1 file changed

+9
-0
lines changed

opengrok-tools/src/main/python/opengrok_tools/utils/restful.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,15 @@
3434

3535

3636
def do_api_call(verb, uri, params=None, headers=None, data=None):
37+
"""
38+
Perform an API call. Will raise an exception if the request fails.
39+
:param verb: string holding HTTP verb
40+
:param uri: URI string
41+
:param params: request parameters
42+
:param headers: HTTP headers dictionary
43+
:param data: data or None
44+
:return: the result of the handler call, can be None
45+
"""
3746
logger = logging.getLogger(__name__)
3847

3948
handler = getattr(requests, verb.lower())

0 commit comments

Comments
 (0)