mirror of
https://github.com/wanghongenpin/proxypin.git
synced 2026-05-22 16:25:49 +08:00
toolbox timestamp convert
This commit is contained in:
@@ -90,10 +90,17 @@ abstract class HttpMessage {
|
||||
return mediaType.charset ?? MediaType.defaultCharset(mediaType);
|
||||
}
|
||||
|
||||
///获取消息
|
||||
String get bodyAsString {
|
||||
return getBodyString(charset: 'utf-8');
|
||||
}
|
||||
|
||||
String getBodyString({String? charset}) {
|
||||
if (body == null || body?.isEmpty == true) {
|
||||
return "";
|
||||
}
|
||||
|
||||
charset ??= this.charset;
|
||||
try {
|
||||
List<int> rawBody = body!;
|
||||
if (headers.contentEncoding == 'br') {
|
||||
|
||||
Reference in New Issue
Block a user