wow dog meme

How does Symfony decide what content type to return in a response?

This isn’t a real article it is a link to an article that explains this process. This way I can find this information again later when I need it and also google can find this question for others in the future and they can find the Symfony cast with the info they need.  And…. this is now one of the most popular articles on the site. LOL

yoda questions meme
Lets find the answers

I found this bit of interesting information in this SymfonyCast here. I had wondered about this when I was creating AJAX calls to Symfony routes.

I was playing with the new Javascript Fetch API and with sending accepted response types. In the end I decided to leave all that off and just get what is returned.

Read the linked SymfonyCast section to get an understanding of the steps/process Symfony is using to decide what content type to return in the headers.

I’d suggest reading that entire SymfonyCast it contains a hell of a lot of useful information.


Posted

in

by

Comments

One response to “How does Symfony decide what content type to return in a response?”

  1. […] How does Symfony decide what content type to return in a response? […]

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: