Java Code Examples for org.apache.hc.core5.http.io.entity.StringEntity
The following examples show how to use
org.apache.hc.core5.http.io.entity.StringEntity. These examples are extracted from open source projects.
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 Project: mts Source File: HttpLoaderServer.java License: GNU General Public License v3.0 | 5 votes |
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); }