From 113cdeb0d9f7b951a38332b77272d5a4417f81a9 Mon Sep 17 00:00:00 2001 From: Timi Date: Thu, 1 Oct 2026 18:46:29 +0800 Subject: [PATCH] v0.1.0 --- pom.xml | 4 ++-- .../java/com/imyeyu/network/TimiRequest.java | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/pom.xml b/pom.xml index c1f0d79..71a6c99 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ com.imyeyu.network timi-network - 0.0.14 + 0.1.0 jar @@ -106,7 +106,7 @@ com.imyeyu.io timi-io - 0.0.5 + 0.1.0 org.apache.httpcomponents.client5 diff --git a/src/main/java/com/imyeyu/network/TimiRequest.java b/src/main/java/com/imyeyu/network/TimiRequest.java index ce68619..1814bd7 100644 --- a/src/main/java/com/imyeyu/network/TimiRequest.java +++ b/src/main/java/com/imyeyu/network/TimiRequest.java @@ -3,7 +3,7 @@ package com.imyeyu.network; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.JavaType; import com.imyeyu.java.bean.CallbackArg; -import com.imyeyu.java.bean.timi.TimiResponse; +import com.imyeyu.java.bean.Response; import org.apache.hc.client5.http.fluent.Request; import org.apache.hc.core5.http.HttpEntity; import org.apache.hc.core5.http.HttpResponse; @@ -94,7 +94,7 @@ public class TimiRequest extends JacksonRequest { * @throws IOException 读取或解析失败 */ public T resultAs(Class clazz) throws IOException { - TimiResponse resp = getObjectMapper().treeToValue(asJsonObject(), timiResponseType(clazz)); + Response resp = getObjectMapper().treeToValue(asJsonObject(), timiResponseType(clazz)); if (resp.isFail()) { throw resp.toException(); } @@ -110,7 +110,7 @@ public class TimiRequest extends JacksonRequest { * @throws IOException 读取或解析失败 */ public T resultAs(TypeReference typeReference) throws IOException { - TimiResponse resp = getObjectMapper().treeToValue(asJsonObject(), timiResponseType(typeReference)); + Response resp = getObjectMapper().treeToValue(asJsonObject(), timiResponseType(typeReference)); if (resp.isFail()) { throw resp.toException(); } @@ -126,7 +126,7 @@ public class TimiRequest extends JacksonRequest { * @throws IOException 读取或解析失败 */ public T resultAs(Type type) throws IOException { - TimiResponse resp = getObjectMapper().treeToValue(asJsonObject(), timiResponseType(type)); + Response resp = getObjectMapper().treeToValue(asJsonObject(), timiResponseType(type)); if (resp.isFail()) { throw resp.toException(); } @@ -135,7 +135,7 @@ public class TimiRequest extends JacksonRequest { @Override public void execute() throws IOException { - TimiResponse resp = getObjectMapper().treeToValue(asJsonObject(), timiResponseType(Object.class)); + Response resp = getObjectMapper().treeToValue(asJsonObject(), timiResponseType(Object.class)); if (resp.isFail()) { throw resp.toException(); } @@ -148,7 +148,7 @@ public class TimiRequest extends JacksonRequest { * @return Jackson 类型 */ protected JavaType timiResponseType(Class clazz) { - return getObjectMapper().getTypeFactory().constructParametricType(TimiResponse.class, clazz); + return getObjectMapper().getTypeFactory().constructParametricType(Response.class, clazz); } /** @@ -158,7 +158,7 @@ public class TimiRequest extends JacksonRequest { * @return Jackson 类型 */ protected JavaType timiResponseType(TypeReference typeReference) { - return getObjectMapper().getTypeFactory().constructParametricType(TimiResponse.class, getObjectMapper().constructType(typeReference)); + return getObjectMapper().getTypeFactory().constructParametricType(Response.class, getObjectMapper().constructType(typeReference)); } /** @@ -168,6 +168,6 @@ public class TimiRequest extends JacksonRequest { * @return Jackson 类型 */ protected JavaType timiResponseType(Type type) { - return getObjectMapper().getTypeFactory().constructParametricType(TimiResponse.class, getObjectMapper().constructType(type)); + return getObjectMapper().getTypeFactory().constructParametricType(Response.class, getObjectMapper().constructType(type)); } } -- 2.54.0