|
|
|
|
|
by mdaniel
967 days ago
|
|
# Capture the content-length header value
[[ "$line" =~ ^Content-Length:\ ([0-9]+) ]]
Be forewarned that the space after any http header is optional <https://www.rfc-editor.org/rfc/rfc9112#name-field-syntax> so require it in your match at your peril. And, of course, http headers are case insenstiive so checking for the upper in any position is rolling the dice id=$(echo -E "$json_payload" | jq -r '.id')
that answers my question about how "in Bash" was going to deal with all the json |
|