mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-17 10:25:15 +00:00
remove using deprecated method
This commit is contained in:
parent
6a20ca562c
commit
a9cac052ec
@ -25,6 +25,7 @@ import org.elasticsearch.rest.support.RestUtils;
|
|||||||
import org.jboss.netty.handler.codec.http.HttpHeaders;
|
import org.jboss.netty.handler.codec.http.HttpHeaders;
|
||||||
import org.jboss.netty.handler.codec.http.HttpMethod;
|
import org.jboss.netty.handler.codec.http.HttpMethod;
|
||||||
|
|
||||||
|
import java.nio.charset.Charset;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@ -99,8 +100,10 @@ public class NettyHttpRequest extends AbstractRestRequest implements HttpRequest
|
|||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static Charset UTF8 = Charset.forName("UTF-8");
|
||||||
|
|
||||||
@Override public String contentAsString() {
|
@Override public String contentAsString() {
|
||||||
return request.getContent().toString("UTF-8");
|
return request.getContent().toString(UTF8);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override public Set<String> headerNames() {
|
@Override public Set<String> headerNames() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user