0

I am re-writing an application in Scala with Play Framework. The original code is in PHP, which I have no experience. Within the server side there are many code lines like:

$_SERVER['QUERY_STRING']
$pathInfo = $_SERVER['PATH_INFO'];
$_SERVER['If-Modified-Since']
$_SERVER['If-None-Match'].

I want to convert these into Scala statements. In play framework I thought the map within the request object in any given controller will do it but it does not. How can I implement this ?

igalbenardete
  • 207
  • 2
  • 12
  • It's hard to guess what your code need to do, jump into PHP docs anyway: http://php.net/manual/en/reserved.variables.server.php – biesior Nov 18 '14 at 13:49
  • @biesior Well it returns image files and if not modified returns them from the cache instead of the server basically – igalbenardete Nov 18 '14 at 13:58

1 Answers1

0

For the query string and path info I found in request.headers which returns a map where you can find different mappings. Query string is also directly returned by request.queryString. However the other two I still could not find

igalbenardete
  • 207
  • 2
  • 12
  • 1
    it just checks if header with that name is available, so check againts the `request.headers` as well see usecase in PHP: http://stackoverflow.com/a/10847262/1066240 – biesior Nov 18 '14 at 14:03