Up to higher level directory | |||
Name | Date | Size | |
---|---|---|---|
android/ | 20-Jun-2014 | ||
Android.mk | 20-Jun-2014 | 3.1K | |
checkstyle.xml | 20-Jun-2014 | 4.9K | |
CONTRIBUTING.md | 20-Jun-2014 | 732 | |
jarjar-rules.txt | 20-Jun-2014 | 36 | |
LICENSE.txt | 20-Jun-2014 | 11.1K | |
MODULE_LICENSE_APACHE2 | 20-Jun-2014 | 0 | |
pom.xml | 20-Jun-2014 | 1.1K | |
README.android | 20-Jun-2014 | 349 | |
README.md | 20-Jun-2014 | 2K | |
src/ | 20-Jun-2014 |
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 For more information please see [the website][1]. 7 8 9 10 Download 11 -------- 12 13 Download [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 24 Building 25 -------- 26 27 ### On the Desktop 28 29 Run OkHttp tests on the desktop with Maven. Running SPDY tests on the desktop uses 30 [Jetty-NPN][3] which requires OpenJDK 7+. 31 32 ``` 33 mvn clean test 34 ``` 35 36 ### On a Device 37 38 OkHttp's test suite creates an in-process HTTPS server. Prior to Android 2.3, SSL server sockets 39 were broken, and so HTTPS tests will time out when run on such devices. 40 41 Test on a USB-attached Android using [Vogar][4]. Unfortunately `dx` requires that you build with 42 Java 6, otherwise the test class will be silently omitted from the `.dex` file. 43 44 ``` 45 mvn clean 46 mvn package -DskipTests 47 vogar \ 48 --classpath ~/.m2/repository/org/bouncycastle/bcprov-jdk15on/1.47/bcprov-jdk15on-1.47.jar \ 49 --classpath ~/.m2/repository/com/google/mockwebserver/mockwebserver/20130122/mockwebserver-20130122.jar \ 50 --classpath target/okhttp-0.9-SNAPSHOT.jar \ 51 ./src/test/java 52 ``` 53 54 55 License 56 ------- 57 58 Licensed under the Apache License, Version 2.0 (the "License"); 59 you may not use this file except in compliance with the License. 60 You may obtain a copy of the License at 61 62 http://www.apache.org/licenses/LICENSE-2.0 63 64 Unless required by applicable law or agreed to in writing, software 65 distributed under the License is distributed on an "AS IS" BASIS, 66 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 67 See the License for the specific language governing permissions and 68 limitations under the License. 69 70 71 72 73 [1]: http://square.github.io/okhttp 74 [2]: http://repository.sonatype.org/service/local/artifact/maven/redirect?r=central-proxy&g=com.squareup.okhttp&a=okhttp&v=LATEST 75 [3]: http://wiki.eclipse.org/Jetty/Feature/NPN 76 [4]: https://code.google.com/p/vogar/ 77