cURL author Daniel Stenberg revealed plans to add native support for JSON to cURL in an email.
Daniel explained the rationale for adding native support for JSON to cURL:
In areas such as REST APIs , sending JSON is very common
When many people are asked about considerations for choosing a cURL alternative, "ease of using JSON" is a common one
On sites like Stack Overflow, quite a few people are unable to send correct JSON and quote JSON correctly using cURL because JSON uses double quotes and the Shell does not expand variables within single quotes
Daniel also said that since he does not often send JSON, it is not appropriate to rely entirely on him to design this function. He needs help from others to make this feature as useful as possible.
Currently Daniel has provided a draft about this feature in the wiki and created a discussion forum.
In short, Daniel plans to add two command line options:
Send formatted JSON as a shortcut to -d with the matching Accept header
Send by constructing JSON request body
--json -||@filename curl --json [whatever] http: //example.com
The above command line is a shortcut and its function is equivalent to- d [whatever] -H "Content-Type: application/json"
.
--jp [part]
('jp' is the abbreviation of "JSON part")
Build the JSON request body, and then use request headerContent-Type: application/json
to send JSON.
[part] are instructions for building JSON content.
(Syntax inspired by jo)
View details: https://github.com/curl/curl/wiki/JSON

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Atom editor mac version download
The most popular open source editor

SublimeText3 Linux new version
SublimeText3 Linux latest version

SublimeText3 Mac version
God-level code editing software (SublimeText3)

SublimeText3 English version
Recommended: Win version, supports code prompts!

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.