win7下IntelliJ IDEA使用curl
curl是利用URL语法在命令行方式下工作的开源文件传输工具
curl命令可以在开发web应用时,模拟前端发起的HTTP请求
1.下载curl
https://curl.haxx.se/download.html

我选择的,Windows 64 bit 7.65.3 binary the curl project,curl-7.65.3_1-win64-mingw.zip
2.解压
curl-7.65.3_1-win64-mingw
3.设置环境变量
set PATH=E:\software\curl-7.65.3_1-win64-mingw\bin;%PATH%
4.配置IntelliJ IDEA
file——>settings——>Terminal

5.使用,打开

测试:
E:\software\curl-7.65.3_1-win64-mingw\bin>curl baidu.com
<html>
<meta http-equiv="refresh" content="0;url=http://www.baidu.com/">
</html>
-i 详细信息
E:\software\curl-7.65.3_1-win64-mingw\bin>curl -i baidu.com
HTTP/1.1 200 OK
Date: Mon, 02 Sep 2019 06:11:13 GMT
Server: Apache
Last-Modified: Tue, 12 Jan 2010 13:48:00 GMT
ETag: "51-47cf7e6ee8400"
Accept-Ranges: bytes
Content-Length: 81
Cache-Control: max-age=86400
Expires: Tue, 03 Sep 2019 06:11:13 GMT
Connection: Keep-Alive
Content-Type: text/html
<html>
<meta http-equiv="refresh" content="0;url=http://www.baidu.com/">
</html>
E:\software\curl-7.65.3_1-win64-mingw\bin>curl localhost:/find
[{"id":1,"name":"111"},{"id":2,"name":"222"},{"id":33,"name":"abc"},{"id":34,"name":"xyz"},{"id":65,"name":"abc"},{"id":66,"name":"xyz"}]
E:\software\curl-7.65.3_1-win64-mingw\bin>curl -i localhost:/find
HTTP/1.1 200
Content-Type: application/json;charset=UTF-8
Transfer-Encoding: chunked
Date: Mon, 02 Sep 2019 06:13:16 GMT
[{"id":1,"name":"111"},{"id":2,"name":"222"},{"id":33,"name":"abc"},{"id":34,"name":"xyz"},{"id":65,"name":"abc"},{"id":66,"name":"xyz"}]
模拟formdata数据
E:\software\curl-7.65.3_1-win64-mingw\bin>curl localhost:/api/getPost -X POST --data "id=1&name=abc"
{"id":1,"name":"abc","other":null,"string":" id=1 name=abc other=null"}
json数据
E:\software\curl-7.65.3_1-win64-mingw\bin>curl localhost:/api/getPostJson -X POST -H "Content-Type:application/json" --data "{\"id\":\"1\",\"name\":\"abc\",\"other\":\"\"}"
{"id":1,"name":"abc","other":"","string":" id=1 name=abc other="}
win7下IntelliJ IDEA使用curl的更多相关文章
- Win7下Intellij开发Scala环境搭建
1.Scala下载并安装 1.Scala的安装时需要依赖JDK的,目前我的电脑上,jdk是已经安装好了,这里就不再说明 2.在地址http://www.scala-lang.org/download/ ...
- WIN7下PHP无法开启CURL,终极解决方案
常规做法: 1)extension=php_curl.dll之外 2)把libeay32.dll.ssleay32.dll.php_curl.dll复制到C:\Windows\SysWOW64目录下 ...
- 解决win7 下 curl无法加载的问题
最近分别在WIN7和Windows8 上分别安装php 高版本!都遇到了这个问题! 一.win7系统64位, apache2.2, php 5.35 vc6 版本 这个比较容易: 1. phpinfo ...
- Win7下安装配置gVim
本文根据vim官网的<Simple Steps to Help You Install gVim on Windows 7>[1]一文整理而成. 1. 下载gVim 在http://www ...
- 解决Win7下运行php Composer出现SSL报错的问题
以前都在linux环境使用php composer.今天尝试在win7下运行composer却出现SSL报错: D:\data\www\mmoyu\symapp>php -f %phprc%\c ...
- win8和win7下解决php5.3和5.4、5.5等不能加载php_curl.dll的终极解决办法 收藏
win8和win7下解决php5.3和5.4.5.5等不能加载php_curl.dll的终极解决办法 收藏2015年01月11日 最近分别在WIN7和Windows8 上分别安装php 高版本!都遇到 ...
- (转载+新增)Win7下安装配置gVim
转载自 http://www.cnblogs.com/zhcncn/p/4151701.html.而后安装过程中加入自己遇到的问题解决方案. 本文根据vim官网的<Simple Steps to ...
- win7下利用ftp实现华为路由器的上传和下载
win7下利用ftp实现华为路由器的上传和下载 1. Win7下ftp的安装和配置 (1)开始->控制面板->程序->程序和功能->打开或关闭Windows功能 (2)在Wi ...
- QC在win7下不能访问QC服务器介绍
本地访问不了服务器QC的主要几个原因总结 服务器serverjbossextensionhpcmd 2016-03-24 兼容性问题: 1.在服务端QC的安装目录下jboss\server\def ...
随机推荐
- 用数据泵技术实现逻辑备份Oracle 11g R2 数据泵技术详解(expdp impdp)
用数据泵技术实现逻辑备份 from:https://blog.csdn.net/weixin_41078837/article/details/80618916 逻辑备份概述 逻辑备份时创建数据库对象 ...
- keywordAsVar.php
<?php //keywordAsVar.php #keywordAsVar.php $True="我是变量True"; echo($True); echo("&l ...
- 命令查询windows&Linux系统版本信息
Linux 查询系统名字输入"cat /proc/version",说明正在运行的内核版本uname -rwindows 查询系统名字win+r -> winversyste ...
- What is the difference between Reactjs and Rxjs?--React is the V (View) in MVC (Model/View/Controller).
This is really different, React is view library; and Rxjs is reactive programming library for javasc ...
- hdu3974-Assign the task-(dfs+线段树)
题意:有n个人,有上下级关系,有m个操作,有两种操作1.把一个任务分给某个人,他的下属也会停下手中工作和他一起做:2.查询某个人的当前任务是什么? 解题:n-1个关系,总有一个人没有上级,以他为根节点 ...
- 微信小程序 深拷贝的那些坑。
网上说的几种方法都不好使,包括直接使用如下: JSON.pars(JSON.stringify(this.data.answer)) ... Object.assign Object.definePr ...
- Good Article Good sentence HDU - 4416 (后缀数组)
Good Article Good sentence \[ Time Limit: 3000 ms\quad Memory Limit: 32768 kB \] 题意 给出一个 \(S\) 串,在给出 ...
- JavaScript基础08——DOM
DOM的概念 DOM是document Object Model的缩写,简称文档对象模型.他给文档提供了一种结构化的表示方式,可以改变文档的内容和呈现方式 所谓的DOM是以家族的形式描述HTML.父子 ...
- plotly-dash 简单使用(一)
plotly-dash 是一个很不错的dashboard 开发平台,基于python 编写,提供了很便捷的dashboard 开发模型 同时扩展上也比较灵活我们可以编写自己的组件. 以下是一个简单的项 ...
- Nginx+Php-fpm运行原理 代理与反向代理
一.代理与反向代理 现实生活中的例子 1.正向代理:访问google.com 如上图,因为google被墙,我们需要vpnFQ才能访问google.com.Virtual Private Networ ...