Need an option to add custom request headers to an AMP-FORM xhr request.
Some APIs needs that some params be set via request headers.

Thanks for opening this feature request issue! I'll prioritize it and we will address it accordingly
What if we add a script tag to config headers, like:
<form method="POST" action-xhr="/form/echo-json/post">
<script type="application/json">
{
"headers" : {
"x-access-token" : "nononononoo"
}
}
</script>
</form>
but is it possible to change, for example _x-access-token_ value via __amp-bind__?
@eduardogoncalves amp-bind would only be able to change attributes on the form element since it is not an AMP element, so it would not be possible to mutate the state.
Just a thought, but if you make the API from <input type="hidden"> with a special name value for a header, it would be bindable.
html
<!-- suggestion -->
<input type="hidden" name="__amp-form-header" value="x-access-token=nononononoo">
<input type="hidden" name="__amp-form-header" value="x-other-header=nononononoo" [value]="'x-other-header=' + variable">
@cvializ currently I'm using this approach with input hidden at https://gerenciador.fidoapp.com.br/ and using a proxy to add headers. But I wish to use it without a proxy.
Hope this feature can be implemented, we also have some APIs need to add a access token in request header.
One possible workaround for this is using amp-script to submit the request.
Most helpful comment
Thanks for opening this feature request issue! I'll prioritize it and we will address it accordingly