Skip to content

Commit

Permalink
pass decode and text to salt.utils.http.query
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholasmhughes committed Feb 15, 2024
1 parent e408a96 commit 30fd892
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions src/saltext/consul/modules/consul.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ def _query(
:param function: The Consul api function to perform.
:param method: The HTTP method, e.g. GET or POST.
:param data: The data to be sent for POST method. This param is ignored for GET requests.
:param decode: Decode
:param text: Text
:param decode: Passed to salt.utils.http.query to decode the output into a data structure.
:param text: Passed to salt.utils.http.query to return the raw response body in the "text" key.
:return: The json response from the API call or False.
"""

Expand Down Expand Up @@ -86,7 +86,8 @@ def _query(
method=method,
params=query_params,
data=data,
decode=True,
decode=decode,
text=text,
status=True,
header_dict=headers,
opts=__opts__,
Expand Down Expand Up @@ -1004,8 +1005,8 @@ def agent_service_register(consul_url=None, token=None, decode=False, text=True,
endpoint must be used periodically to update
the state of the check.
:param check_interval: Interval at which the check should run.
:param decode: Decode
:param text: Text
:param decode: Passed to salt.utils.http.query to decode the output into a data structure.
:param text: Passed to salt.utils.http.query to return the raw response body in the "text" key.
:return: Boolean and message indicating success or failure.
CLI Example:
Expand Down Expand Up @@ -1115,8 +1116,8 @@ def agent_service_deregister(consul_url=None, token=None, serviceid=None, decode
:param consul_url: The Consul server URL.
:param serviceid: A serviceid describing the service.
:param decode: Decode
:param text: Text
:param decode: Passed to salt.utils.http.query to decode the output into a data structure.
:param text: Passed to salt.utils.http.query to return the raw response body in the "text" key.
:return: Boolean and message indicating success or failure.
CLI Example:
Expand Down

0 comments on commit 30fd892

Please sign in to comment.