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

Provide custom headers on methods #125

Closed
leplatrem opened this issue May 2, 2017 · 4 comments
Closed

Provide custom headers on methods #125

leplatrem opened this issue May 2, 2017 · 4 comments

Comments

@leplatrem
Copy link
Contributor

leplatrem commented May 2, 2017

I want to provide custom JSON-merge headers on a call to client.patch_record() but apparently I can't provide them.

It would better to accept custom headers like on the JS client, that would be merged with the ones the session (like authorization)

@glasserc
Copy link
Contributor

glasserc commented May 2, 2017

Having gone through the JS client recently, I'm really nervous about the proliferation of options like headers, retry, safe etc. on every single method. I'd much rather just add something for this one use case, like client.patch_record(JSONMerge(a="new a field")) and client.patch_record(JSONPatch(operations)).

@gabisurita
Copy link
Member

What about a mergeattribute instead of passing raw headers?

@leplatrem
Copy link
Contributor Author

yeah or something like client.patch_record(jsonmerge=payload) or client.patch_record(payload, jsonmerge=True).

If you don't agree, then maybe I would just prefer client.jsonmerge_record() and client.jsonpatch_record().

client.patch_record(JSONMerge(a="new a field"))

How would that one work?

@glasserc
Copy link
Contributor

Fixed in #158.

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

No branches or pull requests

3 participants