# \#okhttp

**URL:** https://www.isharkfly.com/tag/okhttp/79.md

[Latest](https://www.isharkfly.com/latest.md) · [Categories](https://www.isharkfly.com/categories.md) · [Tags](https://www.isharkfly.com/tags.md)

---

## [Retrofit 在 JSON 反序列化的时候提示 UnrecognizedPropertyException 异常](https://www.isharkfly.com/t/retrofit-json-unrecognizedpropertyexception/14399)

<div class="topic-metadata">

**Author:** [@honeymoose](https://www.isharkfly.com/u/honeymoose)\
**Replies:** 0\
**Last updated:** [April 24, 2023, 4:34pm UTC](https://www.isharkfly.com/t/retrofit-json-unrecognizedpropertyexception/14399 "2023-04-24T16:34:12Z")

</div>

提示的异常信息如下： java.lang.RuntimeException: com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "new\_user" (class com.ossez.wechat.common.model.res.UserSummaryResponse$UserData), not marked a…

---

## [Okhttp 的 retrofit2 运行警告信息异常](https://www.isharkfly.com/t/okhttp-retrofit2/14340)

<div class="topic-metadata">

**Author:** [@honeymoose](https://www.isharkfly.com/u/honeymoose)\
**Replies:** 0\
**Last updated:** [March 10, 2023, 6:35pm UTC](https://www.isharkfly.com/t/okhttp-retrofit2/14340 "2023-03-10T18:35:32Z")

</div>

最近在使用一个 okhttp 的项目运行的时候得到下面的警告信息。 WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by retrofit2.Platform (file:/C:/Users/yhu/.m2/repository/com/squareup/retrofit2/retrofit/…

---

## [Okhttp 如何构建一个 Get 的 URL](https://www.isharkfly.com/t/okhttp-get-url/14313)

<div class="topic-metadata">

**Author:** [@lucas](https://www.isharkfly.com/u/lucas)\
**Replies:** 0\
**Last updated:** [February 6, 2023, 8:10pm UTC](https://www.isharkfly.com/t/okhttp-get-url/14313 "2023-02-06T20:10:48Z")

</div>

因项目的需要，构建一个微信请求的 URL。 URL 的配置为： https://open.weixin.qq.com/connect/qrconnect?appid=APPID&redirect\_uri=REDIRECT\_URI&response\_type=code&scope=SCOPE&state=STATE#wechat\_redirect 从这里我们可以看到是 Get 方法中添加参数的方式来进行的。 okHttp okH…

---

## [Okhttp 的 Interceptor 在运行时候提示错误 close](https://www.isharkfly.com/t/okhttp-interceptor-close/14307)

<div class="topic-metadata">

**Author:** [@honeymoose](https://www.isharkfly.com/u/honeymoose)\
**Replies:** 0\
**Last updated:** [January 29, 2023, 1:28pm UTC](https://www.isharkfly.com/t/okhttp-interceptor-close/14307 "2023-01-29T13:28:59Z")

</div>

提示的错误信息如下： 08:23:02.653 \[http-nio-8080-exec-1\] ERROR o.a.c.c.C.\[.\[.\[.\[dispatcherServlet\] - Servlet.service() for servlet \[dispatcherServlet\] in context with path \[\] threw exception \[Request processing failed; nested exc…

---

## [Okhttp 底层库 okio -Buffer](https://www.isharkfly.com/t/okhttp-okio-buffer/14308)

<div class="topic-metadata">

**Author:** [@honeymoose](https://www.isharkfly.com/u/honeymoose)\
**Replies:** 0\
**Last updated:** [January 29, 2023, 1:39pm UTC](https://www.isharkfly.com/t/okhttp-okio-buffer/14308 "2023-01-29T13:39:41Z")

</div>

回顾下几个重要的对象 sink和source：定义了两个接口，此接口是对原有java io中outputStream和inputStream的替代（实际上是做了二次封装） Buffer：缓冲，内部是一个由segment组成的双向循环链表 BufferedSink和BufferedSource：带缓冲功能的sink和source接口 RealBufferedSink和RealBufferedSource：BufferedSink和Bu…

---

## [Retrofit 是什么](https://www.isharkfly.com/t/retrofit/14302)

<div class="topic-metadata">

**Author:** [@honeymoose](https://www.isharkfly.com/u/honeymoose)\
**Replies:** 0\
**Last updated:** [January 21, 2023, 11:14pm UTC](https://www.isharkfly.com/t/retrofit/14302 "2023-01-21T23:14:13Z")

</div>

Android 开发中，从原生的 HttpUrlConnection 到经典的 Apache 的 HttpClient ，再到对前面这些网络基础框架的封装，比如 Volley 、Async Http Client ，Http 相关开源框架的选择还是很多的，其中由著名的 Square 公司开源的 Retrofit 更是以其简易的接口配置、强大的扩展支持、优雅的代码结构受到大家的追捧。也正是由于 Square 家的框架一如既往的简洁优雅。 …
