timomeinen / unirest-java

Unirest in Java: Simplified, lightweight HTTP client library.

Home Page:http://kong.github.io/unirest-java/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unirest for Java

Actions Status MIT License Maven Central Javadocs Twitter Follow

Unirest 4

Unirest 4 is build on modern Java standards, and as such requires at least Java 11.

Unirest 4's dependencies are fully modular, and have been moved to new Maven coordinates to avoid conflicts with the previous versions. You can use a maven bom to manage the modules:

Install With Maven

<dependencyManagement>
  <dependencies>
      <!-- https://mvnrepository.com/artifact/com.konghq/unirest-java-bom --> 
      <dependency>
          <groupId>com.konghq</groupId>
          <artifactId>unirest-java-bom</artifactId>
          <version>4.0.3</version>
          <type>pom</type>
          <scope>import</scope>
      </dependency>
  </dependencies>
</dependencyManagement>

<dependencies>
    <!-- https://mvnrepository.com/artifact/com.konghq/unirest-java-core -->
    <dependency>
        <groupId>com.konghq</groupId>
        <artifactId>unirest-java-core</artifactId>
    </dependency>
    
    <!-- pick a JSON module if you want to parse JSON include one of these: -->
    <!-- Google GSON -->
    <dependency>
        <groupId>com.konghq</groupId>
        <artifactId>unirest-object-mappers-gson</artifactId>
    </dependency>

    <!-- OR maybe you like Jackson better? -->
    <dependency>
        <groupId>com.konghq</groupId>
        <artifactId>unirest-objectmapper-jackson</artifactId>
    </dependency>
</dependencies>

🚨 Attention JSON users 🚨

Under Unirest 4, core no longer comes with ANY transient dependencies, and because Java itself lacks a JSON parser you MUST declare a JSON implementation if you wish to do object mappings or use Json objects.

Upgrading from Previous Versions

See the Upgrade Guide

ChangeLog

See the Change Log for recent changes.

Documentation

Our Documentation

Unirest 3

Maven

<!-- Pull in as a traditional dependency -->
<dependency>
    <groupId>com.konghq</groupId>
    <artifactId>unirest-java</artifactId>
    <version>3.14.1</version>
</dependency>

<!-- OR as a snazzy new standalone jar with shaded dependencies -->
<dependency>
    <groupId>com.konghq</groupId>
    <artifactId>unirest-java</artifactId>
    <version>3.14.1</version>
    <classifier>standalone</classifier>
</dependency>

About

Unirest in Java: Simplified, lightweight HTTP client library.

http://kong.github.io/unirest-java/

License:MIT License


Languages

Language:Java 99.6%Language:Shell 0.4%