Skip to content

Commit

Permalink
Merge pull request #12 from zhefei/gh-pages
Browse files Browse the repository at this point in the history
[API] OPSAPS-61213 Update CM Python API Client Sample Code V2
  • Loading branch information
zhefei authored and GitHub Enterprise committed Jul 23, 2021
2 parents 26e57d7 + a10f7e4 commit c9af4ae
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions docs/python-client-swagger.md
Expand Up @@ -89,7 +89,7 @@ try:
# Any valid api call shall return a Set-Cookie HTTP response header
api_instance = cm_client.ClouderaManagerResourceApi(api_client)
api_instance.get_version()
api_client.cookie = api_client.last_response.getheaders()['Set-Cookie']
api_client.cookie = api_client.last_response.getheader('Set-Cookie')
except ApiException as e:
print("Failed to set session cookies. Exception occurred when calling "
"ClouderaManagerResourceApi->get_version: %s\n" % e)
Expand Down Expand Up @@ -128,7 +128,7 @@ try:
# Any valid api call shall return a Set-Cookie HTTP response header
api_instance = cm_client.ClouderaManagerResourceApi(api_client)
api_instance.get_version()
api_client.cookie = api_client.last_response.getheaders()['Set-Cookie']
api_client.cookie = api_client.last_response.getheader('Set-Cookie')
except ApiException as e:
print("Failed to set session cookies. Exception occurred when calling "
"ClouderaManagerResourceApi->get_version: %s\n" % e)
Expand Down Expand Up @@ -237,7 +237,7 @@ try:
# Any valid api call shall return a Set-Cookie HTTP response header
api_instance = cm_client.ClouderaManagerResourceApi(api_client_v5)
api_instance.get_version()
api_client_v5.cookie = api_client_v5.last_response.getheaders()['Set-Cookie']
api_client_v5.cookie = api_client_v5.last_response.getheader('Set-Cookie')
except ApiException as e:
print("Failed to set session cookies. Exception occurred when calling "
"ClouderaManagerResourceApi->get_version: %s\n" % e)
Expand Down Expand Up @@ -594,7 +594,7 @@ try:
# Any valid api call shall return a Set-Cookie HTTP response header
api_instance = cm_client.ClouderaManagerResourceApi(api_client)
api_instance.get_version()
api_client.cookie = api_client.last_response.getheaders()['Set-Cookie']
api_client.cookie = api_client.last_response.getheader('Set-Cookie')
except ApiException as e:
print("Failed to set session cookies. Exception occurred when calling "
"ClouderaManagerResourceApi->get_version: %s\n" % e)
Expand Down Expand Up @@ -652,7 +652,7 @@ try:
# Any valid api call shall return a Set-Cookie HTTP response header
api_instance = cm_client.ClouderaManagerResourceApi(api_client)
api_instance.get_version()
api_client.cookie = api_client.last_response.getheaders()['Set-Cookie']
api_client.cookie = api_client.last_response.getheader('Set-Cookie')
except ApiException as e:
print("Failed to set session cookies. Exception occurred when calling "
"ClouderaManagerResourceApi->get_version: %s\n" % e)
Expand Down Expand Up @@ -700,7 +700,7 @@ try:
# Any valid api call shall return a Set-Cookie HTTP response header
api_instance = cm_client.ClouderaManagerResourceApi(api_client)
api_instance.get_version()
api_client.cookie = api_client.last_response.getheaders()['Set-Cookie']
api_client.cookie = api_client.last_response.getheader('Set-Cookie')
except ApiException as e:
print("Failed to set session cookies. Exception occurred when calling "
"ClouderaManagerResourceApi->get_version: %s\n" % e)
Expand Down

0 comments on commit c9af4ae

Please sign in to comment.