verifyfirst

preflight · 8 checks

I fetched or scraped a resource

A URL was downloaded, an API called, or a page parsed.

Before you call it done

  1. Check the status code came with a body worth having.curl -sS --fail --compressed URL >out; echo $? # 22 on 4xx/5xx, 18 on truncationguards against NS-016 NS-042 NS-057
  2. Parse the body even on 200. Some APIs report failure inside a success.Look for an errors array, an Error root element, or unprocessed items.guards against NS-045 NS-020 NS-021
  3. Check whether a cache answered.curl -sI URL | grep -iE '^(age|x-cache|cf-cache-status):'guards against NS-058 NS-007
  4. Prefer the canonical marker the document declares over any heuristic ranking.og:image, rel=canonical, structured data — not 'the largest image on the page'guards against NS-006
  5. Confirm credentials survived any redirect.curl -v shows the Authorization header dropped on a cross-origin hop.guards against NS-044
  6. Check large integers survived the parse.Round-trip the value; anything above 2^53 loses precision in a double.guards against NS-025
  7. Compare the bytes received against the declared length.curl -sS -o body -w 'declared=%{size_download}\n' URL && wc -c < bodyguards against NS-075
  8. Read the final status, not the first status line.curl -sS -o /dev/null -w '%{http_code}\n' URL # a 103 can precede the answerguards against NS-078 NS-079

Plain text: /recipes.txt · all tasks