Spark framework: handling POST requests