Wget Interacting With RestAPIs Flashcards

1
Q

How to sending GET request to url?

A

wget -O- [ URL ]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How to sending POST request to url?

A

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 well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How to send PUT request?

A

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 well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How to send DELETE request?

A

wget —method=[ delete ] -O- [ URL ]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How to send multiple headers?

A

wget —header=[ first header ] —header=[ N header ] [ URL ]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How to working with apis on any software?

A

Find with keyword [Software name] API Document

How well did you know this?
1
Not at all
2
3
4
5
Perfectly