Skip to content

Commit

Permalink
possibly working
Browse files Browse the repository at this point in the history
Signed-off-by: vsoch <[email protected]>
  • Loading branch information
vsoch committed Jan 27, 2024
1 parent e62c739 commit 3df025e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions clients/python/flux_restful_client/main/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,15 +104,16 @@ def do_request(

headers = headers or self.headers
url = f"{self.host}/{self.prefix}/{endpoint}"
method = method.upper()

# Make the request and return to calling function, unless requires auth
try:
if method == "POST" and stream:
response = self.session.stream(
method, url, json=data, params=params, headers=headers
)
if method == "POST":
response = self.session.post(url, data=data, headers=headers)
elif method == "POST":
response = self.session.post(url, params=data, headers=headers)
elif method == "GET" and stream:
response = self.session.stream(
method, url, params=params, headers=headers
Expand Down
2 changes: 1 addition & 1 deletion docs/getting_started/developer-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ The following variables are available (with their defaults):
|FLUX_TOKEN| The token password to require for Basic Auth (if `FLUX_REQUIRE_AUTH` is set) | unset |
|FLUX_USER| The username to require for Basic Auth (if `FLUX_REQUIRE_AUTH` is set) | unset |
|FLUX_HAS_GPU | GPUs are available for the user to request | unset |
|FLUX_NUMBER_NODES| The number of nodes available in the cluster | 1 |
|FLUX_NUMBER_NODES| The number of nodes available (exposed) in the cluster | 1 |
|FLUX_OPTION_FLAGS | Option flags to give to flux, in the same format you'd give on the command line | unset |
|FLUX_SECRET_KEY | secret key to be shared between user and server (required) | unset |
|FLUX_ACCESS_TOKEN_EXPIRES_MINUTES| number of minutes to expire an access token | 600 |
Expand Down

0 comments on commit 3df025e

Please sign in to comment.