Skip to content

Bug: payload function in composite.go should set httpHeaders field to map[string]string instead of map[string][]string #56

@sfc-gh-ntrinh

Description

@sfc-gh-ntrinh

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"
            }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions