Skip to content

Batch Request JSON Body Should not include 'Authorization' header #1483

Description

When creating a BatchRequestStep via getRequestInformation in the SDK we are writing the 'Authorization' header which includes a very very long header. When testing, this header value was over 3k characters long. This is causing the following lines to take too long:

try(final PipedOutputStream out = new PipedOutputStream(in)) {
            outputStream.writeTo(out);
            return in;
        }

In order to avoid this, when adding the headers of a batchRequestStep the 'authorization' header should not be included.
Example:

//Original JSON 
{ 
    "requests" : [
        { 
            "id": "123", 
            "url": "/me", 
            "method": "GET", 
            "headers": { 
                "authorization": "Bearer String 3k chars in length", 
                "accept": "application/json" 
            } 
        }
    ]
} 
// Solution JSON
{ 
    "requests" : [
        { 
            "id": "123", 
            "url": "/me", 
            "method": "GET", 
            "headers": { 
                "accept": "application/json" 
            } 
        }
    ]
}   
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions