OkHttp

com.squareup.okhttp : okhttp

560 usages

Add dependency in Maven / Gradle

<dependency>
    <groupId>com.squareup.okhttp</groupId>
    <artifactId>okhttp</artifactId>
    <version>2.7.5</version>
</dependency>

How to add dependency in a project

  1. Add dependency to a Maven project
  2. Add dependency to a Gradle project
  3. Add dependency to a SBT Scala project
  4. Add dependency to a Grape project

1. Add dependency to a Maven project

Maven: Add the com.squareup.okhttp:okhttp library to the dependencies element of your pom.xml file:

<dependencies>
<dependency>
  <groupId>com.squareup.okhttp</groupId>
  <artifactId>okhttp</artifactId>
  <version>2.7.5</version>
</dependency>
</dependencies>

To install com.squareup.okhttp:okhttp library use the following command:

mvn install

2. Add dependency to a Gradle project

Gradle Groovy DSL: Add the com.squareup.okhttp:okhttp library to the dependencies section of your build.gradle file:

dependencies {
implementation 'com.squareup.okhttp:okhttp:2.7.5'
}

Gradle Kotlin DSL: Add the com.squareup.okhttp:okhttp library to the dependencies section of your build.gradle.kts file:

dependencies {
implementation("com.squareup.okhttp:okhttp:2.7.5")
}

3. Add dependency to a SBT Scala project

Scala: Add the com.squareup.okhttp:okhttp library to your build.sbt file:

libraryDependencies += "com.squareup.okhttp" % "okhttp" % "2.7.5"

4. Add dependency to a Grape project

Grape: Add an annotation com.squareup.okhttp:okhttp library to your groovy script file:

@Grapes(
    @Grab('com.squareup.okhttp:okhttp:2.7.5')
)

Compile Dependencies (0)

Group / Artifact Usage

Provided Dependencies (1)

Group / Artifact Usage
com.google.android » android 470

Test Dependencies (0)

Group / Artifact Usage