HTTPS 是如何保证安全的

众所周知,HTTP 协议是明文传输的,在网络世界里用 HTTP 协议发送报文相当于裸奔,于是就有了 HTTPS
这个 S 是什么呢,是如何保证我们发送的报文就不被窃取和篡改了呢,让我们慢慢道来

阅读更多

Retrofit with okhttp

封装接口

首先,我们将将请求api封装成一个接口(interface), Retrofit 通过这个定义的interface生成一个具体的实现。
interface中进行接口api的定义,比如

1
2
3
4
    public interface RepoService {
@GET("/users/{user}/repos")
Call<ResponseBody> listRepo(@Path("user") String user);
}
阅读更多