Wget Interacting With RestAPIs Flashcards
How to sending GET request to url?
wget -O- [ URL ]
How to sending POST request to url?
wget —method=[ post ] -O- —body-data=[ body in json format ] —header=[ string ] [ url ]
Ex: wget —method=post -O- -q —body-data=‘{“tittle”: “wget POST”, “body”: “Wget POST example body”, “userID”: 1}’ —header=Content-Type:application/json https://jsonplaceholder.typicode.com/posts
How to send PUT request?
wget —method=[ put ] -O- —body-data=[ body in json format ] —header=[ string ] [ url ]
Ex: wget —method=put -O- -q —body-data=‘{“tittle”: “wget PUT”, “body”: “Wget PUT example body”, “userID”: 1}’ —header=Content-Type:application/json https://jsonplaceholder.typicode.com/posts/1
How to send DELETE request?
wget —method=[ delete ] -O- [ URL ]
How to send multiple headers?
wget —header=[ first header ] —header=[ N header ] [ URL ]
How to working with apis on any software?
Find with keyword [Software name] API Document