mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-06-01 00:28:18 +08:00
fix grpc contentType
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -13,7 +13,10 @@ import 'package:protobuf/protobuf.dart' show GeneratedMessage;
|
||||
abstract final class GrpcReq {
|
||||
static const _isolateSize = 256 * 1024;
|
||||
|
||||
static final options = Options(responseType: ResponseType.bytes);
|
||||
static final options = Options(
|
||||
contentType: 'application/grpc',
|
||||
responseType: ResponseType.bytes,
|
||||
);
|
||||
|
||||
static Uint8List compressProtobuf(Uint8List proto) {
|
||||
proto = const GZipEncoder().encodeBytes(proto);
|
||||
|
||||
@@ -8,7 +8,6 @@ import 'package:PiliPlus/grpc/bilibili/metadata/locale.pb.dart';
|
||||
import 'package:PiliPlus/grpc/bilibili/metadata/network.pb.dart' as network;
|
||||
import 'package:PiliPlus/utils/login_utils.dart';
|
||||
import 'package:PiliPlus/utils/utils.dart';
|
||||
import 'package:dio/dio.dart';
|
||||
|
||||
abstract final class GrpcHeaders {
|
||||
static const _build = 2001100;
|
||||
@@ -22,7 +21,6 @@ abstract final class GrpcHeaders {
|
||||
static String get _sessionId => Utils.generateRandomString(8);
|
||||
|
||||
static final Map<String, String> _base = {
|
||||
Headers.contentTypeHeader: 'application/grpc',
|
||||
'grpc-encoding': 'gzip',
|
||||
'gzip-accept-encoding': 'gzip,identity',
|
||||
'user-agent': Constants.userAgent,
|
||||
|
||||
Reference in New Issue
Block a user