Can't insert variable with two headers in curl
You need to use an array, at which point you can put all the headers in the array and simplify your call.
#!/usr/bin/env bashvalue_for_header="value"headers=( -H "custom1: ololo1" -H "custom2: ololo2" -H "Content-Type: application/json" -H "custom_ololo: $value_for_header")curl -X "PUT" "${headers[@]}" http://localhost:8000/ -d '{"a": true}' -vv