Request - server parameters
mabar opened this issue · 4 comments
mabar commented
I am missing abstraction for $_SERVER
in request. I would like to have IRequest->getServerParameters()
. Should I send a PR?
JanTvrdik commented
Why? $_SERVER
means nothing in HTTP context. It's just a collection of bunch of random stuff. It's better to have a specific methods like getRequestUrl()
or getHeaders()
.
mabar commented
E.g. sending files on-the-fly needs handling specific for $_SERVER['SERVER_SOFTWARE']
Some software solutions also add their variables in $_SERVER
and I need to access them.
dg commented
And can you add some specific method for this purpose?
mabar commented
It should abstract all server variables, even custom ones, so not really