Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing json response #43

Merged
merged 1 commit into from
Aug 25, 2022
Merged

Fixing json response #43

merged 1 commit into from
Aug 25, 2022

Conversation

singhpranjali
Copy link
Contributor

fixes: #37

Copy link
Collaborator

@csadorf csadorf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot!

While reviewing this PR I noticed that we are returning str on a few operations, e.g., here:

@check_capability_availability
def create_collection(
self,
collection_name: object_storage.CollectionName = None,
metadata: dict = None,
) -> str:
return self._client.put(
self._proxy_path("createCollection"),
params={"collection_name": collection_name} if collection_name else {},
headers=_encode_metadata(metadata),
).text

However, according to the API, the response is actually also a JSON object. Can we fix that inconsistency, please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use json() property of responses to the proxy requests
2 participants