编程语言
首页 > 编程语言> > Java 发送http请求

Java 发送http请求

作者:互联网

 

一、httpclient

HttpClient 3 ,由于早已不在维护

        <dependency>
            <groupId>commons-httpclient</groupId>
            <artifactId>commons-httpclient</artifactId>
            <version>3.1</version>
        </dependency>

HttpClient 4

        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpcore</artifactId>
            <version>4.4.14</version>
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient</artifactId>
            <version>4.5.5</version>
        </dependency>

二、springboot

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>

 

标签:Java,spring,boot,http,springframework,发送,httpcomponents,org,httpclient
来源: https://www.cnblogs.com/shining-feifan/p/16266444.html