GET and POST Methods in Spark