org.apache.hc.core5.http.io.entity.StringEntity Java Examples

The following examples show how to use org.apache.hc.core5.http.io.entity.StringEntity. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: HttpLoaderServer.java    From mts with GNU General Public License v3.0 5 votes vote down vote up
public void sendResponse( ClassicHttpResponse response,HttpContext context, HttpRequest request)throws HttpException, IOException
{

    response.setCode(HttpStatus.SC_OK);
    File file = new File("D:/XMLloader/testPileHttp/test/fileTestHttp.txt");
    //FileEntity body = new FileEntity(file, "text/html");
    HttpEntity body = new StringEntity("");
    response.setEntity(body);
}