Skip to content

Conversation

@trivikr
Copy link
Member

@trivikr trivikr commented Jan 14, 2026

Issue

Description

Validates request/response content-type in a queue.

Testing

Before

Prints lot of debug statements, and doesn't check for content-type used by protocol.

$ client-sqs> yarn test:e2e test/SQS.e2e.spec.ts

 RUN  v3.2.4 /local/home/trivikr/workspace/aws-sdk-js-v3/clients/client-sqs

stdout | test/SQS.e2e.spec.ts > SQS > can make requests with AwsQueryProtocol
200 POST SQSClient ListQueuesCommand
    https://sqs.us-west-2.amazonaws.com/
    >>== Request Headers: {
      "content-type": "application/x-www-form-urlencoded",
      "content-length": "36",
      "x-amz-user-agent": "aws-sdk-js/3.968.0",
      "user-agent": "aws-sdk-js/3.968.0 ua/2.1 os/linux#5.10.247-246.989.amzn2int.x86_64 lang/js md/nodejs#20.19.0 api/sqs#3.968.0 m/E,w,v",
...
 Test Files  1 passed (1)
      Tests  2 passed (2)
   Start at  02:36:01
   Duration  599ms (transform 100ms, setup 0ms, collect 174ms, tests 169ms, environment 0ms, prepare 91ms)

After

Doesn't print debug statements, and checks for content-type used by protocol.
Also creates a

$ client-sqs> yarn test:e2e test/SQS.e2e.spec.ts
...
 Test Files  1 passed (1)
      Tests  2 passed (2)
   Start at  04:10:07
   Duration  753ms (transform 99ms, setup 0ms, collect 167ms, tests 319ms, environment 0ms, prepare 81ms)

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant