This commit is contained in:
2025-12-02 19:39:37 +08:00
parent 5e4c16c577
commit c56655c728
3 changed files with 14 additions and 5 deletions

View File

@@ -26,8 +26,12 @@ NSErrorDomain const KBNetworkErrorDomain = @"com.company.keyboard.network";
if (self = [super init]) {
_enabled = NO; //
_timeout = 10.0;
// / Accept
_defaultHeaders = @{ @"Accept": @"*/*" };
// Accept + 使 Accept-Language
NSString *lang = [KBLocalizationManager shared].currentLanguageCode ?: @"en";
_defaultHeaders = @{
@"Accept": @"*/*",
@"Accept-Language": lang
};
//
_baseURL = [NSURL URLWithString:KB_BASE_URL];
}