| | |
| | | import com.sun.net.httpserver.HttpExchange; |
| | | import de.uhilger.httpserver.auth.ApiAuthenticator; |
| | | import de.uhilger.httpserver.auth.realm.User; |
| | | import de.uhilger.httpserver.base.handler.HttpHelper; |
| | | import de.uhilger.httpserver.base.handler.HttpResponder; |
| | | import java.io.IOException; |
| | | import java.util.logging.Logger; |
| | |
| | | {"name": "fred", "password": "secret"} |
| | | das kann wie folgt gelesen werden |
| | | */ |
| | | String body = bodyLesen(exchange); |
| | | String body = new HttpHelper().bodyLesen(exchange); |
| | | Gson gson = new Gson(); |
| | | User user = gson.fromJson(body, User.class); |
| | | return user; |