|
|
@@ -3,6 +3,7 @@ package com.cyksj.service.chatgpt.impl;
|
|
|
import cn.hutool.core.lang.UUID;
|
|
|
import cn.hutool.http.HttpRequest;
|
|
|
import cn.hutool.http.HttpResponse;
|
|
|
+import cn.hutool.http.Method;
|
|
|
import cn.hutool.json.JSONObject;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
import com.cyksj.common.exception.BusinessRuntimeException;
|
|
|
@@ -57,7 +58,7 @@ public class ChatGptAccountServiceImpl implements ChatGptAccountService{
|
|
|
request.form("username", account.getAccount());
|
|
|
request.form("password", account.getPassword());
|
|
|
request.header("Content-Type","application/x-www-form-urlencoded");
|
|
|
- HttpResponse execute = request.execute();
|
|
|
+ HttpResponse execute = request.method(Method.POST).execute();
|
|
|
JSONObject loginResult = new JSONObject(execute.body());
|
|
|
//detail
|
|
|
if (StringUtils.isBlank(loginResult.getStr("accessToken"))) {
|