Up to higher level directory | |||
Name | Date | Size | |
---|---|---|---|
android/ | 09-Oct-2013 | ||
Android.mk | 09-Oct-2013 | 1.4K | |
checkstyle.xml | 09-Oct-2013 | 4.9K | |
CONTRIBUTING.md | 09-Oct-2013 | 732 | |
jarjar-rules.txt | 09-Oct-2013 | 36 | |
LICENSE.txt | 09-Oct-2013 | 11.1K | |
MODULE_LICENSE_APACHE2 | 09-Oct-2013 | 0 | |
pom.xml | 09-Oct-2013 | 4.9K | |
README.android | 09-Oct-2013 | 349 | |
README.md | 09-Oct-2013 | 2.3K | |
src/ | 09-Oct-2013 |
1 URL: https://github.com/square/okhttp 2 License: Apache 2 3 Description: "OkHttp: An HTTP+SPDY client for Android and Java applications." 4 5 Local patches 6 ------------- 7 - Changes to libcore/util/Libcore.java to remove OpenJDK / Jetty dependencies. 8 - Change SpdyWriter.java to call Libcore#newDeflaterOutputStream instead 9 of using a hidden constructor. 10 11
1 OkHttp 2 ====== 3 4 An HTTP+SPDY client for Android and Java applications. 5 6 7 Download 8 -------- 9 10 Downloadable .jars can be found on the [GitHub download page][1]. 11 12 You can also depend on the .jar through Maven: 13 14 ```xml 15 <dependency> 16 <groupId>com.squareup</groupId> 17 <artifactId>okhttp</artifactId> 18 <version>(insert latest version)</version> 19 </dependency> 20 ``` 21 22 23 Known Issues 24 ------------ 25 26 OkHttp uses the platform's [ProxySelector][2]. Prior to Android 4.0, `ProxySelector` didn't honor the `proxyHost` and `proxyPort` system properties for HTTPS connections. Work around this by specifying the `https.proxyHost` and `https.proxyPort` system properties when using a proxy with HTTPS. 27 28 OkHttp's test suite creates an in-process HTTPS server. Prior to Android 2.3, SSL server sockets were broken, and so HTTPS tests will time out when run on such devices. 29 30 31 Building 32 -------- 33 34 ### On the Desktop 35 Run OkHttp tests on the desktop with Maven. Running SPDY tests on the desktop uses [Jetty-NPN](http://wiki.eclipse.org/Jetty/Feature/NPN) which requires OpenJDK 7+. 36 ``` 37 mvn clean test 38 ``` 39 40 ### On a Device 41 Test on a USB-attached Android using [Vogar](https://code.google.com/p/vogar/). Unfortunately `dx` requires that you build with Java 6, otherwise the test class will be silently omitted from the `.dex` file. 42 ``` 43 mvn clean 44 mvn package -DskipTests 45 vogar \ 46 --classpath ~/.m2/repository/org/bouncycastle/bcprov-jdk15on/1.47/bcprov-jdk15on-1.47.jar \ 47 --classpath ~/.m2/repository/com/google/mockwebserver/mockwebserver/20130122/mockwebserver-20130122.jar \ 48 --classpath target/okhttp-0.9-SNAPSHOT.jar \ 49 ./src/test/java 50 ``` 51 52 53 License 54 ------- 55 56 Licensed under the Apache License, Version 2.0 (the "License"); 57 you may not use this file except in compliance with the License. 58 You may obtain a copy of the License at 59 60 http://www.apache.org/licenses/LICENSE-2.0 61 62 Unless required by applicable law or agreed to in writing, software 63 distributed under the License is distributed on an "AS IS" BASIS, 64 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 65 See the License for the specific language governing permissions and 66 limitations under the License. 67 68 69 70 [1]: http://github.com/square/okhttp/downloads 71 [2]: http://developer.android.com/reference/java/net/ProxySelector.html 72