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

Appending .JSON is not required #35

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

KamranSyed
Copy link

Appending .json in service url is causing client to fail. I have just removed it.

Appending .json in service url is causing client to fail. I have just removed it.
@Kaijiro
Copy link

Kaijiro commented Apr 21, 2018

From the documentation you can see that

If no format option is provided, an attempt is made to extract it from the response Content-Type header.

Without the format option, no extension will be added to your url.
Just know that a lot of frameworks are using this functionnality to guess which content type use to format the response.

@lifeforms
Copy link

lifeforms commented Jul 23, 2018

It would be a cool nice-to-have if appending the .format to the URL would be an optional switch, but let's not keep it a default. Making it the default caused confusion to a developer on a project of ours. I think removing it would be great.

@Kaijiro
Copy link

Kaijiro commented Jul 24, 2018

Btw, I think that commenting the statement L157 makes the previous if block (that uses no brackets) apply itself on the next if statement (L162).
Correct me if I'm wrong.

EDIT : Remove typo

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