Manuals / Linux & CLI for Testers / Chapter 6

B · Tester toolkit · intermediate · Week 2 · Chapter 6 of 9

Networking lite for QA

curl, ping, dig/nslookup, ssh basics. Hit APIs and check headers without Postman sometimes.

Path progress
67%

Step 1 of 1

curl an API

curl an APIDrag stickies · tap for tips
Study mapDrag stickies · tap for tipsKeep it shortdrag · tap →Name the waitdrag · tap →Scope locatorsdrag · tap →Trace when stuckdrag · tap →One browser firstdrag · tap →Isolate statedrag · tap →Assert the UIdrag · tap →Retry wiselydrag · tap →Seed datadrag · tap →Close the loopdrag · tap →Keep it shortdrag · tap →Name the waitdrag · tap →Scope locatorsdrag · tap →Trace when stuckdrag · tap →One browser firstdrag · tap →Isolate statedrag · tap →Pathwise hackdrag · tap →curl an APIdrag · tap →Try thisdrag · tap →Follow the dashed drag · tap →

Example

curl -sS -D - -o ~/cli-lab/data/body.json https://httpbin.org/get | head
jq . ~/cli-lab/data/body.json 2>/dev/null || cat ~/cli-lab/data/body.json

Do this now

GET a public API; show status and headers. Save body to a file.

Pro tip: Don’t curl random internal prod URLs with write methods.

Was this step clear?
Chapter learning outcomes
  • curl
  • DNS peek
  • SSH caution

Clear these before you leave