|
Name |
|
Date |
Size |
#Lines |
LOC |
| .. | | - | - |
| android/ | | 03-May-2024 | - | 1,244 | 817 |
| benchmarks/ | | 03-May-2024 | - | 1,005 | 707 |
| mockwebserver/ | | 03-May-2024 | - | 2,374 | 1,648 |
| okcurl/ | | 03-May-2024 | - | 457 | 366 |
| okhttp/ | | 03-May-2024 | - | 16,311 | 10,449 |
| okhttp-apache/ | | 03-May-2024 | - | 513 | 423 |
| okhttp-tests/ | | 03-May-2024 | - | 17,044 | 12,976 |
| okio/ | | 03-May-2024 | - | 4,874 | 3,160 |
| samples/ | | 03-May-2024 | - | 614 | 494 |
| website/ | | 03-May-2024 | - | 552 | 473 |
| Android.mk | D | 03-May-2024 | 3.3 KiB | 85 | 59 |
| CHANGELOG.md | D | 03-May-2024 | 5.9 KiB | 180 | 124 |
| CONTRIBUTING.md | D | 03-May-2024 | 732 | 18 | 12 |
| LICENSE.txt | D | 03-May-2024 | 11.1 KiB | 203 | 169 |
| MODULE_LICENSE_APACHE2 | D | 03-May-2024 | 0 | | |
| README.android | D | 03-May-2024 | 507 | 14 | 11 |
| README.md | D | 03-May-2024 | 2.9 KiB | 107 | 71 |
| build.gradle | D | 03-May-2024 | 293 | 17 | 14 |
| checkstyle.xml | D | 03-May-2024 | 4.6 KiB | 132 | 64 |
| concurrency.md | D | 03-May-2024 | 4.8 KiB | 64 | 32 |
| deploy_website.sh | D | 03-May-2024 | 916 | 46 | 21 |
| jarjar-rules.txt | D | 03-May-2024 | 69 | 3 | 2 |
| pom.xml | D | 03-May-2024 | 6.1 KiB | 203 | 182 |
README.android
README.md
1OkHttp
2======
3
4An HTTP & SPDY client for Android and Java applications.
5
6For more information please see [the website][1].
7
8
9
10Download
11--------
12
13Download [the latest JAR][2] or grab via Maven:
14
15```xml
16<dependency>
17 <groupId>com.squareup.okhttp</groupId>
18 <artifactId>okhttp</artifactId>
19 <version>(insert latest version)</version>
20</dependency>
21```
22
23
24Building
25--------
26
27OkHttp requires Java 7 to build and run tests. Runtime compatibility with Java 6 is enforced as
28part of the build to ensure compliance with Android and older versions of the JVM.
29
30
31
32Testing
33-------
34
35### On the Desktop
36
37Run OkHttp tests on the desktop with Maven. Running SPDY tests on the desktop uses
38[Jetty-NPN][3] which requires OpenJDK 7+.
39
40```
41mvn clean test
42```
43
44### On a Device
45
46OkHttp's test suite creates an in-process HTTPS server. Prior to Android 2.3, SSL server sockets
47were broken, and so HTTPS tests will time out when run on such devices.
48
49Test on a USB-attached Android using [Vogar][4]. Unfortunately `dx` requires that you build with
50Java 6, otherwise the test class will be silently omitted from the `.dex` file.
51
52```
53mvn clean
54mvn package -DskipTests
55vogar \
56 --classpath ~/.m2/repository/org/bouncycastle/bcprov-jdk15on/1.48/bcprov-jdk15on-1.48.jar \
57 --classpath mockwebserver/target/mockwebserver-2.0.0-SNAPSHOT.jar \
58 --classpath okhttp-protocols/target/okhttp-protocols-2.0.0-SNAPSHOT.jar \
59 --classpath okhttp/target/okhttp-2.0.0-SNAPSHOT.jar \
60 okhttp/src/test
61```
62
63MockWebServer
64-------------
65
66A library for testing HTTP, HTTPS, HTTP/2.0, and SPDY clients.
67
68MockWebServer coupling with OkHttp is essential for proper testing of SPDY and HTTP/2.0 so that code can be shared.
69
70### Download
71
72Download [the latest JAR][5] or grab via Maven:
73
74```xml
75<dependency>
76 <groupId>com.squareup.okhttp</groupId>
77 <artifactId>mockwebserver</artifactId>
78 <version>(insert latest version)</version>
79 <scope>test</scope>
80</dependency>
81```
82
83
84License
85-------
86
87 Licensed under the Apache License, Version 2.0 (the "License");
88 you may not use this file except in compliance with the License.
89 You may obtain a copy of the License at
90
91 http://www.apache.org/licenses/LICENSE-2.0
92
93 Unless required by applicable law or agreed to in writing, software
94 distributed under the License is distributed on an "AS IS" BASIS,
95 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
96 See the License for the specific language governing permissions and
97 limitations under the License.
98
99
100
101
102 [1]: http://square.github.io/okhttp
103 [2]: http://repository.sonatype.org/service/local/artifact/maven/redirect?r=central-proxy&g=com.squareup.okhttp&a=okhttp&v=LATEST
104 [3]: http://wiki.eclipse.org/Jetty/Feature/NPN
105 [4]: https://code.google.com/p/vogar/
106 [5]: http://repository.sonatype.org/service/local/artifact/maven/redirect?r=central-proxy&g=com.squareup.okhttp&a=mockwebserver&v=LATEST
107