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

chore(connection): content type doesn't have to be parametrized #752

Merged
merged 2 commits into from Jan 22, 2024

Conversation

jnussbaum
Copy link
Collaborator

No description provided.

Copy link
Collaborator

@Nora-Olivia-Ammann Nora-Olivia-Ammann left a comment

Choose a reason for hiding this comment

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

I disagree that this is unnecessary (rdflib is sometimes iffy with jsonld). It is possible that in future we may wish to hand over the content type differently. As it already exists, I would leave it.

But we are in a democracy, if Balduin approves then you can merge if you like.

Copy link
Collaborator

@BalduinLandolt BalduinLandolt left a comment

Choose a reason for hiding this comment

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

to me it makes sense not to pass content-type as a separate parameter. However, I would say we should only set it to the default, if it's not already set in the provided headers. Like that we'd still have the option to pass a different content type, simply by passing it in the headers dict.

Would that be "konsensfähig"? @Nora-Olivia-Ammann what do you think?

@Nora-Olivia-Ammann
Copy link
Collaborator

Nora-Olivia-Ammann commented Jan 22, 2024

to me it makes sense not to pass content-type as a separate parameter. However, I would say we should only set it to the default, if it's not already set in the provided headers. Like that we'd still have the option to pass a different content type, simply by passing it in the headers dict.

Would that be "konsensfähig"? @Nora-Olivia-Ammann what do you think?

That makes sense to me. Would it be best you think to give a dict as default value, with that info, then deepcopy it in the function and change the rest there'

@jnussbaum
Copy link
Collaborator Author

to me it makes sense not to pass content-type as a separate parameter. However, I would say we should only set it to the default, if it's not already set in the provided headers. Like that we'd still have the option to pass a different content type, simply by passing it in the headers dict.
Would that be "konsensfähig"? @Nora-Olivia-Ammann what do you think?

That makes sense to me. Would it be best you think to give a dict as default value, with that info, then deepcopy it in the function and change the rest there'

No, he meant that if someone wants to give a custom content type, it can be passed inside the "headers" parameter. the content type belongs into the header anyways, so it doesn't make sense to have a separate parameter for it.

But for this to work, I must not overwrite an existing content type that is in the passed headers. I changed that, so the PR is now again ready for review.

Copy link
Collaborator

@BalduinLandolt BalduinLandolt left a comment

Choose a reason for hiding this comment

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

thanks!

@jnussbaum jnussbaum merged commit 2c0febb into main Jan 22, 2024
11 checks passed
@jnussbaum jnussbaum deleted the wip/remove-content-type branch January 22, 2024 13:42
@daschbot daschbot mentioned this pull request Jan 22, 2024
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.

None yet

3 participants