Skip to content

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

@ramsessanchez

Description

@ramsessanchez

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

Metadata

Metadata

Assignees

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