hoppscotch / hopp-doc-gen

📔 API documentation generator CLI for https://hoppscotch.io
https://hoppscotch.io
MIT License
129 stars 14 forks source link

feature: test api with postwoman-collection.json #3

Closed yubathom closed 4 years ago

yubathom commented 4 years ago

Describe the solution you'd like send api requests and report status based on postwoman-collection.json file

Describe alternatives you've considered create a new command send or test to send and report the status of the requests

Aditional context

$ pw-cli send path/to/postwoman-collection.json

regres.in # collection name
┌──────────────────────────────────────────────────┬───────────────┬───────────────┐
│ url                                              │ method        │ status        │
├──────────────────────────────────────────────────┼───────────────┼───────────────┤
│ https://reqres.in/api/users                      │ GET           │ 200           │
├──────────────────────────────────────────────────┼───────────────┼───────────────┤
│ https://reqres.in/api/users/api/users            │ POST          │ 201           │
├──────────────────────────────────────────────────┼───────────────┼───────────────┤
│ https://reqres.in/api/users/api/users/999        │ GET           │ 200           │
├──────────────────────────────────────────────────┼───────────────┼───────────────┤
│ https://reqres.in/api/users/api/users/999        │ DELETE        │ 403           │
└──────────────────────────────────────────────────┴───────────────┴───────────────┘

future: could have some options to display full headers and the response body --headers --response

liyasthomas commented 4 years ago

IMG_20200129_104519_050 IMG_20200129_104447_020 IMG_20200129_104443_872

@athul is working on a fully rewritten CLI (WIP) for PW 🔥🎉

liyasthomas commented 4 years ago

https://github.com/athul/pwcli is now live. Further improvements regarding CLI will be there! Huge thanks for @athul for making thhis gem!

athul commented 4 years ago

Screen Shot 2020-01-31 at 6 36 15 PM @yubathom done

The post method is a bit buggy with content types but it'll work

https://github.com/athul/pwcli