curl json test tool for linux
来源:互联网 发布:思考软件 创新设计 编辑:程序博客网 时间:2024/06/05 05:45
man curl:
-X, --request <command>
(HTTP) Specifies a custom request method to use when communicat‐ing with the HTTP server. The specified request will be used
instead of the method otherwise used (which defaults to GET).
Read the HTTP 1.1 specification for details and explanations.
Common additional HTTP requests include PUT and DELETE, but
related technologies like WebDAV offers PROPFIND, COPY, MOVE and
more.
Normally you don't need this option. All sorts of GET, HEAD,
POST and PUT requests are rather invoked by using dedicated com‐
mand line options.
This option only changes the actual word used in the HTTP
request, it does not alter the way curl behaves. So for example
-d, --data <data>
(HTTP) Sends the specified data in a POST request to the HTTP
server, in the same way that a browser does when a user has
filled in an HTML form and presses the submit button. This will
cause curl to pass the data to the server using the content-type
application/x-www-form-urlencoded. Compare to -F, --form.
-d, --data is the same as --data-ascii. To post data purely
binary, you should instead use the --data-binary option. To URL-
encode the value of a form field you may use --data-urlencode.
If any of these options is used more than once on the same com‐
mand line, the data pieces specified will be merged together
with a separating &-symbol. Thus, using '-d name=daniel -d
skill=lousy' would generate a post chunk that looks like
'name=daniel&skill=lousy'.
If you start the data with the letter @, the rest should be a
file name to read the data from, or - if you want curl to read
the data from stdin. The contents of the file must already be
URL-encoded. Multiple files can also be specified. Posting data
from a file named 'foobar' would thus be done with --data @foo‐
bar.
-H, --header <header>
(HTTP) Extra header to use when getting a web page. You may
specify any number of extra headers. Note that if you should add
a custom header that has the same name as one of the internal
ones curl would use, your externally set header will be used
instead of the internal one. This allows you to make even trick‐
ier stuff than curl would normally do. You should not replace
internally set headers without knowing perfectly well what
you're doing. Remove an internal header by giving a replacement
without content on the right side of the colon, as in: -H
"Host:". If you send the custom header with no-value then its
header must be terminated with a semicolon, such as -H "X-Cus‐
tom-Header;" to send "X-Custom-Header:".
curl will make sure that each header you add/replace is sent
with the proper end-of-line marker, you should thus not add that
as a part of the header content: do not add newlines or carriage
returns, they will only mess things up for you.
See also the -A, --user-agent and -e, --referer options.
This option can be used multiple times to add/replace/remove
multiple headers.
example:
curl -X POST -H "Content-Type: application/json" -d '{"ReqName":"edw","ReqType":1,"Action":{"strDeviceID":"111","Value":100}}' http://localhost:8080/
- curl json test tool for linux
- linux test tool
- open source test tool for telematics
- A bash script for tool version test
- HTTPie: a CLI, cURL-like tool for humans
- Tool test
- test tool
- [Perl]Test tool for exacting image with GraphicsMagick
- Good .screenrc configuration for linux tool screen
- test pic tool
- Monkey stress-test tool
- web httperf test tool
- onvif device test tool
- i2c-test tool summary
- i2c-test tool summary
- for test test test
- curl test REST interface
- Good tool for ubuntu, as a linux programer
- C++中的sizeof与strlen的一个重要区别
- Codeforces Round #209 (Div. 2), problem: (A) Table problem: (B) Permutation
- IT面试题目汇总
- OpenGL ES学习 1
- IOS 之 Core Loaction 定位服务与地图
- curl json test tool for linux
- Oracle排序过滤重复数据,取最新的数据 .
- CentOs6.3无线网卡驱动的安装
- Android UI 设计文本技巧
- (折半查找树)BinSearchTree模板类
- Linux服务器性能评估与优化
- Spring MVC 教程,快速入门,深入理解
- 括号配对
- eclipse 生成可运行JAR包并引入第三方包