Patch Changes
-
#28
0936f74Thanks @4bmis! - fix(send): auto-refresh expired OAuth tokens once on 401/403.On a 401/403 from the upstream, if the request used a
$POSTAGENT.<SITE>.TOKENbacked by an OAuth credential with a saved refresh_token,postagent sendnow refreshes the access_token once and retries. Static credentials and non-recoverable refresh failures fall back to the existing error path. -
#24
5e86187Thanks @4bmis! - feat(send): support-d @fileand-d @-to read the request body from a file or stdin (curl-compatible).postagent send ... -d @./payload.jsonreads the body from./payload.jsoninstead of treating@./payload.jsonas a literal string. Previously the only way to send a file's contents was-d "$(cat payload.json)", which was easy to miss and produced confusing API errors (e.g. GitHub returning400 Problems parsing JSON) when forgotten.postagent send ... -d @-reads the body from stdin, matching curl's shorthand for piping payloads in.- Resolution happens before
$POSTAGENT.<SITE>.TOKENsubstitution and the token-presence check, so templates inside the file are still resolved and the body's actual contents (not the path) participate in validation. - Inline
-d <value>continues to work unchanged for values that don't start with@.