I was using this for a project and noticed that Salesforce expects a map[string]string instead of map[string][]string for the httpHeaders field in composite subrequests.
https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/dome_composite_record_manipulation.htm
When I use
"httpHeaders": {
"Some-Header": ["defg"]
}
I get the error
[
{
"message": "Invalid type provided for value in 'httpHeaders'",
"errorCode": "JSON_PARSER_ERROR"
}
]
and the request works when I use
"httpHeaders": {
"Some-Header": "defg"
}