| | |
| | | */ |
| | | package de.uhilger.mediaz.api; |
| | | |
| | | import com.sun.net.httpserver.Headers; |
| | | import com.sun.net.httpserver.HttpExchange; |
| | | import com.sun.net.httpserver.HttpHandler; |
| | | import java.io.BufferedReader; |
| | |
| | | response = json; |
| | | } else { |
| | | response = "nicht gefunden"; |
| | | returnCode = RTC_NOT_FOUND; |
| | | //returnCode = RTC_NOT_FOUND; |
| | | } |
| | | break; |
| | | |
| | |
| | | break; |
| | | } |
| | | logger.fine(response); |
| | | Headers headers = e.getResponseHeaders(); |
| | | headers.add("Content-Type", "application/json"); |
| | | e.sendResponseHeaders(getReturnCode(), response.length()); |
| | | OutputStream os = e.getResponseBody(); |
| | | os.write(response.getBytes()); |