Skip to content

Commit

Permalink
niutrans-support check dev
Browse files Browse the repository at this point in the history
  • Loading branch information
BigGuang97 committed Nov 23, 2023
1 parent 88f9623 commit a40b5f4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Easydict/Feature/Service/Niutrans/EZNiuTransTranslate.m
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@ - (void)niuTransTranslate:(NSString *)text from:(EZLanguage)from to:(EZLanguage)
};

AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
manager.responseSerializer=[AFJSONResponseSerializer serializer];
manager.responseSerializer.acceptableContentTypes = [NSSet setWithObjects:@"application/json", @"text/html", @"text/plain", nil];
manager.session.configuration.timeoutIntervalForRequest = EZNetWorkTimeoutInterval;
NSURLSessionTask *task = [manager POST:url parameters:params progress:nil success:^(NSURLSessionDataTask *_Nonnull task, id _Nullable responseObject) {
EZNiuTransTranslateResponse *niuTransTranslateResult = [EZNiuTransTranslateResponse mj_objectWithKeyValues:responseObject];
Expand Down

0 comments on commit a40b5f4

Please sign in to comment.