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

Set tranformResponse property of axios req. config to an identity function #358

Merged
merged 1 commit into from
Jun 4, 2019

Conversation

amarzavery
Copy link
Contributor

@amarzavery amarzavery commented Jun 4, 2019

axios changed the way it treats properties of the request config in 0.19.0. Previously we were setting trasnformResponse to undefined. This would indicate axios to not transform (JSON.parse()) the response body. In 0.19.0, they are setting the default response transformer if transformResponse is set to undefined. This breaks our pasrsing logic where we are doing JSON.parse() on operationResponse.bodyAsText. Moreover, we are exposing the bodyAsText property in the generated clients.
Not populating this property or setting the value of this property to a parsed JSON would be a breaking change for our users.
Hence we are setting the transformResponse property in the request config to an indentity function that returns the response body as-is.

@amarzavery amarzavery requested a review from a user June 4, 2019 23:33
@amarzavery amarzavery merged commit 8c76e21 into Azure:master Jun 4, 2019
daviwil added a commit to daviwil/azure-sdk-for-js that referenced this pull request Jun 5, 2019
daviwil added a commit to daviwil/azure-sdk-for-js that referenced this pull request Jun 6, 2019
daviwil added a commit to daviwil/azure-sdk-for-js that referenced this pull request Jun 6, 2019
daviwil added a commit to Azure/azure-sdk-for-js that referenced this pull request Jun 6, 2019
…actions (#3449)

* Add new @azure/identity library and @azure/core-http abstractions

* Add CI configuration for @azure/identity

* Fix linter errors

* Exclude ClientCertificateCredential for now

* Move getDefaultAzureCredential to index.ts

* Fix OAuth access token request

* Remove CredentialScopes type

* Add token refresh logic and tests for AzureCredential

* Fix wrong path in ci.yml

* Correct TokenCredential.getToken doc string

* AggregateCredential should break when token is found

* Remove refreshBufferMs from IdentityClientOptions

* Remove AzureCredential from public exports

* Rename AzureCredential's getTokenCore to getAccessToken

* Add EnvironmentCredential and ClientSecretCredential tests

* Add missing copyright headers in source files

* Run Prettier on all source files

* Migrate ms-rest-js changes from PR Azure/ms-rest-js#358

* Add basic usage examples to README.md

* Add integration information for SDK authors

* Propagate abortSignal to getToken correctly

* Update description and keywords in package.json

* Re-export TokenCredential and RequestOptionsBase
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