Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix isJSON for AWS content type #771

Merged
merged 1 commit into from
Jun 1, 2021
Merged

Conversation

fxalgrain
Copy link
Contributor

I create this PR to deals with the following issue.

When working with some AWS API, you have to use the "application/x-amz-json-1.1" content type.
The issue is this content type is not recognized as JSON and so, you can not bind the result to variable.
Instead you get the following error : "Only JSON and XML response/request body is supported to query the result"

You can reproduce the issue with this snippet:

# @name login
POST https://cognito-idp.eu-west-1.amazonaws.com
Content-Type: application/x-amz-json-1.1
X-Amz-Target: AWSCognitoIdentityProviderService.InitiateAuth


{
   "AuthParameters" : {
      "USERNAME" : "<user>",
      "PASSWORD" : "<pwd>"
   },
   "AuthFlow" : "USER_PASSWORD_AUTH",
   "ClientId" : "123456789"
}
@id_token = {{login.response.body.AuthenticationResult.IdToken}}

@Huachao Huachao merged commit 3729676 into Huachao:master Jun 1, 2021
@Huachao
Copy link
Owner

Huachao commented Jun 1, 2021

@fxalgrain Merged, thanks

@fxalgrain
Copy link
Contributor Author

@fxalgrain Merged, thanks

You're welcome, but it's me to thanks you about your amazing work on this tool!

Have a good day

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.

2 participants