rest - Why Grails ignores the HTTP Accept header by default? -
rest - Why Grails ignores the HTTP Accept header by default? -
from grails documentation ..
grails ignores http take header unless add together grails.mime.use.accept.header = true setting config.groovy file. in other words, withformat() unaffected take header without setting
why selection made ? there concern using take header, such way grails default interprets format parameter ??
what's pro , cons of specify communication medium format parameter or take header in rest architecture ?
some older browsers send either invalid take headers or */*
isn't helpful grails can default utilize take header because otherwise on browsers xml or json sent instead of html within browser. having said behaviour has changed in more recent versions of grails.
in more recent versions of grails (since 2.3.0) accept
header is enabled default, ignored user-agent
strings (i.e. browsers)
https://github.com/grails/grails-core/blob/master/grails-resources/src/grails/grails-app/conf/config.groovy#l17
rest grails groovy
Comments
Post a Comment