Using Postman to make requests of GET, POST, PUT & DELETE
step 1 -> download postman from Download Postman from
Download Postman | Try Postman for Free
install it and sign in if u have multiple accounts choose any one account
click on create new then
go to the collection tab then click on + to create new collection and give any name and
click on ⚫⚫⚫ then go to add request give a name
step 2-> create an API for using post get delete (I’m using git API )
got your git hub and then setting tab and developer setting then personal access token then — →> generate new token give the name and Select scopes (select ✔✔✔✔✔ all the scopes).
then generate a new token (bottom )
copy token
go to sample ⚫⚫⚫ and then authorization then type ->> bearer token
paste the copied token and then
go the github rest API documentation then end point API then repo .
(direct link -> Endpoints available for GitHub Apps — GitHub Docs)
step 3 -> get request in postman
go to third i.e GET /repos/{owner}/{repo}
copy the https://api.github.com/users/username/repos
and enter it in the postman
go to get req and then enter the link and under authorzation
select the inherit from parent (token is used in sample collection . its sub collection )
you can see the the repo name from github
step 4-> POST request in postman
copy this under github documentation Create a repository for the authenticated user
then everything is the same as get
change the request to post under subcollection
new repo got created in your github using postman 🥂 then you see the status in postman 201 ->successfully created (401 and 400 bad requests) and it took and size
step 5 -> DELETE using postman
go to git documentation (link ->Repositories — GitHub Docs)
Delete a repository
DELETE /repos/{owner}/{repo}Shell
curl \
-X DELETE \
-H "Accept: application/vnd.github.v3+json" \
https://api.github.com/repos/unsernam/reponame
the repo got deleted refer the documentation for other requests
😁😁 make sure to delete
kee ur your GitHub safe ;-)