Okhttp面试简答
发布日期:2021-05-14 17:51:47 浏览次数:11 分类:精选文章

本文共 5442 字,大约阅读时间需要 18 分钟。

OkHttp������������

1.1 OkHttp ���������������

OkHttp ������������ Google ������������������ HTTP ������������������������������������������������������������ SPDY ������������ HTTP 2.0��������������������������������������������� HTTP ������������������������OkHttp ��������������������� GZIP ���������������������������������������������������������������������������������OkHttp ���������������������������������������������������������������������������������������������������������������������������OkHttp ���������������������������������������������������������Persistent connections��������������������������������������������������������� TCP ���������������������������������������������������������OkHttp ��������������������������������������������������������������� RetryAndFollowUpInterceptor ������������������������������

1.2 OkHttp ������������������

OkHttp ������������������������ Dispatcher������������������Interceptor���������������������Dispatcher ���������������������������������������������������������������������������������������Interceptor ��������������������������������������������������������������� SSL ������������������������������������������BridgeInterceptor ��� CacheInterceptor ���������������������������������������������������������������������������

1.3 OkHttp ������������������

  • ������������ OkHttp ��������������������������������� UI���

    ��������������������������������������� OkHttpClient ������������������������������������������������ asynchronous ��������������������������������������������������������� UI���

  • OkHttp ������������������

    OkHttp ���������������������������������������������������������������������������������������Dispatcher ���������������������������������������������������Interceptors ���������������������Call��������������������� HTTP ��������������������� Callback ������������������������������

  • OkHttp ���������������������

    ��� Persistent connections��������������� Keep-Alive ������������������������ TCP ������������������������������

    ��� GZIP ������������������������������������������������������������������������
    ��� ��������������������� CacheInterceptor ������������������������������������������
    ��� ��������������������� RetryAndFollowUpInterceptor ������������������������������������������������������������

  • OkHttp ������������

    OkHttp ���������������������������������������������������������������������������������������������������Builder ������������������������������������������������������������������������������������������������������������������������������������������������������

2.1 ���������������������������������

���������������������������������������������������������������������OkHttp ������������������������������������������ HTTP 2.0���GZIP ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������

  • ������ persistent connections��������� TCP ���������������������������������������������������������

  • ������ HTTP ������headers������������������������������������������������������������

  • ��������������������������������������������� HTTP ������������������������������������������

  • ���������������������������������������������������������������������������������������������

  • ���������������������������������������������������������������������

    2.2 ���������������������������������������

    ���������������������������������������������������������OkHttp ������������������������������������������������������������������ ConnectionPool ������������ TCP ���������������������������������������������������������������������������������

  • ������ ConnectionPool������ TCP ������������������������������������������������

  • ������ DNS rr��������� DNS ���������������������������������������������

  • ** hospitals ������**������������������������������������������������������

  • ������������������������������������������������������������ Nginx������

  • ���������������������������������������������������������������������������������

    2.3 OkHttp ��� Apache HttpComponents Compared

    ������������ Apache HttpComponents ���������OkHttp ������������������������������������������������������������������������������OkHttp ������������������������

  • ������������������������������������������������������������������

  • ������������������������������������������������������ HTTP/2 ������������������������

  • ���������������������������������������������������������������

  • ������������������OkHttp ��������������������� HTTP ������������������������������

  • ��������������������������� ConnectionPool ������������������������������ TCP ������������������

  • 3.1 OkHttp ���������������������������

    OkHttp ���������������������������������������������������������������������������������������������������������������������������������������

  • ��������������������������������� Keep-Alive ��������������� TCP ������������������������������������������

  • ������������������������������������������ GZIP ���������������������������������

  • ������������������������������ CacheInterceptor ���������������������������������

  • ���������������������������������������������������������������������������������������������������

  • ���������������������������������������������������������������������������������������������������������������

  • ������������������������������������������������������������������������������������������������������������

    上一篇:安卓MVP浅析及Presenter的生命周期问题
    下一篇:MaterialDesign系列文章

    发表评论

    最新留言

    哈哈,博客排版真的漂亮呢~
    [***.90.31.176]2025年04月30日 15时32分27秒