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

Read and write with content type #67

Merged
merged 4 commits into from
Jan 26, 2023
Merged

Read and write with content type #67

merged 4 commits into from
Jan 26, 2023

Conversation

atimin
Copy link
Member

@atimin atimin commented Jan 26, 2023

Closes #

Please check if the PR fulfills these requirements

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • CHANGELOG.md have been updated (for bug fixes / features / docs)

What kind of change does this PR introduce?

Feautre

What is the current behavior?

Since version 1.3, ReductStore supports the Conten-Type header, but the SDK doesn't"t provide an API for this.

What is the new behavior?

No, you can write and read records with the content type:

    await bucket_1.write("entry-1", b"something", content_type="text/plain")

    async with bucket_1.read("entry-1") as record:
        data = await record.read_all()
        assert data == b"something"
        assert record.content_type == "text/plain"

Does this PR introduce a breaking change?

No

Other information:

@atimin atimin merged commit a646780 into main Jan 26, 2023
@atimin atimin deleted the support-type-content branch January 26, 2023 20:36
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.

1 participant