package net.davidvoid.thor.lightning.webservice;

import java.util.Enumeration;

import javax.servlet.http.HttpServletRequest;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by david on 3/20/16.
 */
@RestController
@RequestMapping("/users")
public class UserService {
	
	@RequestMapping(method = RequestMethod.GET)
	public String welcome(HttpServletRequest req) {
	    Enumeration<String> it = req.getAttributeNames();
	    while (it.hasMoreElements()) {
	        String name = it.nextElement();
	        System.out.println(name + " = " + req.getAttribute(name));
	    }
		return "hello world";
	}
	
	@RequestMapping(value = "/{username}", method = RequestMethod.PUT)
	public String register() {
	    return null;
	}
	
	@RequestMapping(value = "/{username}/login", method = RequestMethod.POST)
	public String login() {
	    return null;
	}
	
	@RequestMapping(value = "/{username}/logout", method = RequestMethod.POST)
	public String logout() {
	    return null;
	}
	
	@RequestMapping(value = "/{username}", method = RequestMethod.GET)
	public String getUser() {
	    return null;
	}
}

@@ -519,215 +519,8 @@
 ) %7B%0A
-%09    Enumeration%3CString%3E it = req.getAttributeNames();%0A%09    while (it.hasMoreElements()) %7B%0A%09        String name = it.nextElement();%0A%09        System.out.println(name + %22 = %22 + req.getAttribute(name));%0A%09    %7D%0A
 %09%09re

remove unused code