It's a great json formatter where you can view into different type like form,view,tree,code
https://jsonformatter.org
Showing posts with label json. Show all posts
Showing posts with label json. Show all posts
Saturday, December 22, 2018
Sunday, November 4, 2018
curl example
In my freelance job, I have tasked which I need to call the API using curl. I don't have any much knowledge of it but I think I got some idea.
Basically, the API is called by a PDA mobile device where a user can enter the information and will send through JSON format and call the API.
But the API call will not always return success. The first task which I want to do is to store that raw json into the server, which I already finish implemented.
The second one is to call the API through curl and passing the failed raw JSON. So before will run the curl, a user who only has SSH access to a server can able to edit the raw JSON and run curl to call API with edited raw JSON.
here's the curl syntax:
curl -vX POST http://206.189.159.4:8080/chicken/api/order/create -d @json/20181008-180947_PDA_1.json --header "Content-Type: application/json"
let me explain more:
-v = verbose
X = request
-d = data json file (i don't know why there is @ at the beginning)
--header "Content-Type: application/json" = i think its understandable as we pass json file here
Eureka!
Basically, the API is called by a PDA mobile device where a user can enter the information and will send through JSON format and call the API.
But the API call will not always return success. The first task which I want to do is to store that raw json into the server, which I already finish implemented.
The second one is to call the API through curl and passing the failed raw JSON. So before will run the curl, a user who only has SSH access to a server can able to edit the raw JSON and run curl to call API with edited raw JSON.
here's the curl syntax:
curl -vX POST http://206.189.159.4:8080/chicken/api/order/create -d @json/20181008-180947_PDA_1.json --header "Content-Type: application/json"
let me explain more:
-v = verbose
X = request
-d = data json file (i don't know why there is @ at the beginning)
--header "Content-Type: application/json" = i think its understandable as we pass json file here
Eureka!
Subscribe to:
Posts (Atom)
free online comma separating tool
https://delim.co/#
-
In my current company, I'm using Visual Paradigm for my documentation task. If you go there site, you can either download community and ...
-
I spend many days to figure it out my problem in Vagrant. After I posted my question in stackoverflow, nobody is helping me instead they dow...
-
I used KeePass long time ago and until now I'm still using it. It's a great tool to save your password encrypted. At my home, I sa...