Skip to content

enabling json post requests to invalidate_sessions #156

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

Merged
merged 1 commit into from
Jun 1, 2018

Conversation

tejon-melero
Copy link
Contributor

What happens right now:
since the function invalidate_sessions looks in the POST body of the request for the client id, at the moment this endpoint only works when clients post to this endpoint with form-data --> content type application/x-www-form-urlencoded or multipart/form-data

What should happen:
the invalidate_sessions endpoint should also accept content-type 'application/json'.

Django Rest Framework's data field takes any type of content type in post requests and makes it accessible.

…in order to be able to accept all sort of content types in post requests at this endpoint
@fthuin
Copy link

fthuin commented May 22, 2018

Great ! It works for me, wasn't able to use the view with application/json 👍

@fthuin
Copy link

fthuin commented Jun 1, 2018

@PhilipGarnero Any update on this? I had to create my own view with a copy/paste of the code of this pull request to handle it, which I don't like because I want to keep compatibility with newer versions.

@PhilipGarnero PhilipGarnero merged commit c8f1152 into RealmTeam:master Jun 1, 2018
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.

3 participants