Stream: python

Topic: add content-type=application/json header


view this post on Zulip Philip Durbin 🚀 (May 10 2024 at 11:00):

Where are we with this? fix newer dataverse compatibility by adding content-type=application/json header - https://github.com/gdcc/pyDataverse/pull/145

We want this fix for 0.3.2, right?

By the way, I added this breaking change (on the Dataverse backend) to the new-ish API Changelog in this PR: Explain that 5.6 introduced a breaking change to the create dataset API #10467

view this post on Zulip Jan Range (May 10 2024 at 12:03):

Oddly, I have not encountered this problem anymore when testing. Afaik httpx does add the content header according to what has been passed. As a safety measure I have added a small check to ensure httpx knows that it is JSON.

image.png

view this post on Zulip Jan Range (May 10 2024 at 12:04):

On the right-hand-side you can see what has been sent upon the POST request

view this post on Zulip Jan Range (May 10 2024 at 12:04):

Tests are running fine, would push it directly to master

view this post on Zulip Philip Durbin 🚀 (May 10 2024 at 12:08):

Great! That PR closes https://github.com/gdcc/pyDataverse/issues/143 . Should we close that issue manually with an explanation? And add the 0.3.2 milestone to it?

view this post on Zulip Jan Range (May 10 2024 at 12:10):

Yes, that is a good idea :smile:

view this post on Zulip Jan Range (May 10 2024 at 12:12):

Added to the milestone and writing a closing comment now

view this post on Zulip Philip Durbin 🚀 (May 10 2024 at 12:53):

Looks great. I just closed the PR with a comment for @Péter Pallinger (who opened it): https://github.com/gdcc/pyDataverse/pull/145#issuecomment-2104557901


Last updated: Nov 01 2025 at 14:11 UTC