mirror of
https://github.com/devsnaith/lumiere-server.git
synced 2024-11-23 17:13:14 +03:00
Edit the name from Basic to SimpleResponse
This commit is contained in:
parent
ad5757faae
commit
231830b6b4
Binary file not shown.
@ -1,23 +0,0 @@
|
||||
package org.eu.lumiere.utils;
|
||||
|
||||
import org.eu.lumiere.net.http.HttpRequest;
|
||||
import org.eu.lumiere.net.http.HttpRequestHandler;
|
||||
import org.eu.lumiere.net.http.HttpResponse;
|
||||
|
||||
public class BasicResponse implements HttpRequestHandler {
|
||||
|
||||
private String body = "BasicResponse is running";
|
||||
private boolean html_response = false;
|
||||
|
||||
public BasicResponse(String body, boolean rhtml) {
|
||||
this.body = body == null ? this.body : body;
|
||||
this.html_response = rhtml;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRequestReceived(HttpRequest request, HttpResponse response) {
|
||||
response.setContentType(String.format("text/%s", html_response ? "html" : "plan"));
|
||||
response.push(body);
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user