authing_ruby 1.1.4 → 1.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/authing_ruby.gemspec +4 -2
- data/lib/authing_ruby/common/PublicKeyManager.rb +12 -1
- data/lib/authing_ruby/version.rb +1 -1
- metadata +10 -467
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/CONTRIBUTION.md +0 -23
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/LICENSE +0 -21
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/README.md +0 -303
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build-doc.js +0 -520
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/browser/index.min.js +0 -2
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/browser/index.min.js.LICENSE.txt +0 -91
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/index.d.ts +0 -7
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/index.js +0 -20
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/authentication/AuthenticationClient.d.ts +0 -1118
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/authentication/AuthenticationClient.js +0 -2859
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/authentication/AuthenticationTokenProvider.d.ts +0 -13
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/authentication/AuthenticationTokenProvider.js +0 -56
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/authentication/BaseAuthenticationClient.d.ts +0 -6
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/authentication/BaseAuthenticationClient.js +0 -31
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/authentication/EnterpriseAuthenticationClient.d.ts +0 -92
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/authentication/EnterpriseAuthenticationClient.js +0 -250
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/authentication/MfaAuthenticationClient.d.ts +0 -303
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/authentication/MfaAuthenticationClient.js +0 -665
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/authentication/QrCodeAuthenticationClient.d.ts +0 -232
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/authentication/QrCodeAuthenticationClient.js +0 -622
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/authentication/SocialAuthenticationClient.d.ts +0 -104
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/authentication/SocialAuthenticationClient.js +0 -180
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/authentication/types.d.ts +0 -341
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/authentication/types.js +0 -69
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/common/GraphqlClient.d.ts +0 -14
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/common/GraphqlClient.js +0 -127
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/common/HttpClient.d.ts +0 -19
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/common/HttpClient.js +0 -151
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/common/PublicKeyManager.d.ts +0 -18
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/common/PublicKeyManager.js +0 -81
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/graphqlapi.d.ts +0 -121
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/graphqlapi.js +0 -2002
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/AclManagementClient.d.ts +0 -236
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/AclManagementClient.js +0 -863
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/AgreementManagementClient.d.ts +0 -65
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/AgreementManagementClient.js +0 -195
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/ApplicationsManagementClient.d.ts +0 -216
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/ApplicationsManagementClient.js +0 -533
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/GroupsManagementClient.d.ts +0 -188
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/GroupsManagementClient.js +0 -404
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/MFAManagementClient.d.ts +0 -58
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/MFAManagementClient.js +0 -126
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/ManagementClient.d.ts +0 -79
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/ManagementClient.js +0 -203
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/ManagementTokenProvider.d.ts +0 -39
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/ManagementTokenProvider.js +0 -159
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/OrgManagementClient.d.ts +0 -521
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/OrgManagementClient.js +0 -840
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/PoliciesManagementClient.d.ts +0 -304
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/PoliciesManagementClient.js +0 -512
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/RolesManagementClient.d.ts +0 -296
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/RolesManagementClient.js +0 -711
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/StatisticsManagementClient.d.ts +0 -56
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/StatisticsManagementClient.js +0 -198
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/UdfManagementClient.d.ts +0 -146
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/UdfManagementClient.js +0 -264
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/UserActionManagementClient.d.ts +0 -44
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/UserActionManagementClient.js +0 -106
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/UserpoolManagementClient.d.ts +0 -142
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/UserpoolManagementClient.js +0 -241
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/UsersManagementClient.d.ts +0 -784
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/UsersManagementClient.js +0 -1251
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/WhitelistManagementClient.d.ts +0 -114
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/WhitelistManagementClient.js +0 -259
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/types.d.ts +0 -992
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/types.js +0 -96
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/platform/express/index.d.ts +0 -30
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/platform/express/index.js +0 -126
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/testing-helper.d.ts +0 -31
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/testing-helper.js +0 -67
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/utils.d.ts +0 -53
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/utils.js +0 -343
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/version.d.ts +0 -1
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/version.js +0 -5
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/types/graphql.v2.d.ts +0 -6241
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/types/graphql.v2.js +0 -251
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/types/index.d.ts +0 -7
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/types/index.js +0 -3
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/index.d.ts +0 -7
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/index.js +0 -8
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/authentication/AuthenticationClient.d.ts +0 -1118
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/authentication/AuthenticationClient.js +0 -2853
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/authentication/AuthenticationTokenProvider.d.ts +0 -13
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/authentication/AuthenticationTokenProvider.js +0 -53
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/authentication/BaseAuthenticationClient.d.ts +0 -6
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/authentication/BaseAuthenticationClient.js +0 -28
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/authentication/EnterpriseAuthenticationClient.d.ts +0 -92
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/authentication/EnterpriseAuthenticationClient.js +0 -247
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/authentication/MfaAuthenticationClient.d.ts +0 -303
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/authentication/MfaAuthenticationClient.js +0 -662
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/authentication/QrCodeAuthenticationClient.d.ts +0 -232
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/authentication/QrCodeAuthenticationClient.js +0 -619
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/authentication/SocialAuthenticationClient.d.ts +0 -104
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/authentication/SocialAuthenticationClient.js +0 -177
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/authentication/types.d.ts +0 -341
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/authentication/types.js +0 -66
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/common/GraphqlClient.d.ts +0 -14
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/common/GraphqlClient.js +0 -121
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/common/HttpClient.d.ts +0 -19
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/common/HttpClient.js +0 -145
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/common/PublicKeyManager.d.ts +0 -18
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/common/PublicKeyManager.js +0 -78
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/graphqlapi.d.ts +0 -121
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/graphqlapi.js +0 -1999
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/AclManagementClient.d.ts +0 -236
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/AclManagementClient.js +0 -860
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/AgreementManagementClient.d.ts +0 -65
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/AgreementManagementClient.js +0 -192
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/ApplicationsManagementClient.d.ts +0 -216
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/ApplicationsManagementClient.js +0 -530
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/GroupsManagementClient.d.ts +0 -188
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/GroupsManagementClient.js +0 -401
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/MFAManagementClient.d.ts +0 -58
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/MFAManagementClient.js +0 -123
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/ManagementClient.d.ts +0 -79
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/ManagementClient.js +0 -197
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/ManagementTokenProvider.d.ts +0 -39
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/ManagementTokenProvider.js +0 -153
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/OrgManagementClient.d.ts +0 -521
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/OrgManagementClient.js +0 -818
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/PoliciesManagementClient.d.ts +0 -304
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/PoliciesManagementClient.js +0 -509
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/RolesManagementClient.d.ts +0 -296
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/RolesManagementClient.js +0 -708
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/StatisticsManagementClient.d.ts +0 -56
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/StatisticsManagementClient.js +0 -195
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/UdfManagementClient.d.ts +0 -146
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/UdfManagementClient.js +0 -261
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/UserActionManagementClient.d.ts +0 -44
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/UserActionManagementClient.js +0 -103
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/UserpoolManagementClient.d.ts +0 -142
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/UserpoolManagementClient.js +0 -238
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/UsersManagementClient.d.ts +0 -784
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/UsersManagementClient.js +0 -1248
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/WhitelistManagementClient.d.ts +0 -114
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/WhitelistManagementClient.js +0 -256
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/types.d.ts +0 -992
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/types.js +0 -93
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/platform/express/index.d.ts +0 -30
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/platform/express/index.js +0 -123
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/testing-helper.d.ts +0 -31
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/testing-helper.js +0 -62
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/utils.d.ts +0 -53
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/utils.js +0 -336
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/version.d.ts +0 -1
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/version.js +0 -2
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/types/graphql.v2.d.ts +0 -6241
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/types/graphql.v2.js +0 -248
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/types/index.d.ts +0 -7
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/types/index.js +0 -1
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/index.d.ts +0 -7
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/index.js +0 -30
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/authentication/AuthenticationClient.d.ts +0 -1118
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/authentication/AuthenticationClient.js +0 -2869
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/authentication/AuthenticationTokenProvider.d.ts +0 -13
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/authentication/AuthenticationTokenProvider.js +0 -66
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/authentication/BaseAuthenticationClient.d.ts +0 -6
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/authentication/BaseAuthenticationClient.js +0 -41
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/authentication/EnterpriseAuthenticationClient.d.ts +0 -92
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/authentication/EnterpriseAuthenticationClient.js +0 -260
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/authentication/MfaAuthenticationClient.d.ts +0 -303
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/authentication/MfaAuthenticationClient.js +0 -675
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/authentication/QrCodeAuthenticationClient.d.ts +0 -232
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/authentication/QrCodeAuthenticationClient.js +0 -632
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/authentication/SocialAuthenticationClient.d.ts +0 -104
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/authentication/SocialAuthenticationClient.js +0 -190
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/authentication/types.d.ts +0 -341
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/authentication/types.js +0 -79
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/common/GraphqlClient.d.ts +0 -14
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/common/GraphqlClient.js +0 -137
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/common/HttpClient.d.ts +0 -19
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/common/HttpClient.js +0 -161
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/common/PublicKeyManager.d.ts +0 -18
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/common/PublicKeyManager.js +0 -91
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/graphqlapi.d.ts +0 -121
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/graphqlapi.js +0 -2012
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/AclManagementClient.d.ts +0 -236
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/AclManagementClient.js +0 -873
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/AgreementManagementClient.d.ts +0 -65
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/AgreementManagementClient.js +0 -205
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/ApplicationsManagementClient.d.ts +0 -216
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/ApplicationsManagementClient.js +0 -543
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/GroupsManagementClient.d.ts +0 -188
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/GroupsManagementClient.js +0 -414
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/MFAManagementClient.d.ts +0 -58
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/MFAManagementClient.js +0 -136
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/ManagementClient.d.ts +0 -79
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/ManagementClient.js +0 -213
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/ManagementTokenProvider.d.ts +0 -39
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/ManagementTokenProvider.js +0 -169
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/OrgManagementClient.d.ts +0 -521
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/OrgManagementClient.js +0 -850
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/PoliciesManagementClient.d.ts +0 -304
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/PoliciesManagementClient.js +0 -522
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/RolesManagementClient.d.ts +0 -296
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/RolesManagementClient.js +0 -721
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/StatisticsManagementClient.d.ts +0 -56
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/StatisticsManagementClient.js +0 -208
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/UdfManagementClient.d.ts +0 -146
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/UdfManagementClient.js +0 -274
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/UserActionManagementClient.d.ts +0 -44
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/UserActionManagementClient.js +0 -116
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/UserpoolManagementClient.d.ts +0 -142
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/UserpoolManagementClient.js +0 -251
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/UsersManagementClient.d.ts +0 -784
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/UsersManagementClient.js +0 -1261
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/WhitelistManagementClient.d.ts +0 -114
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/WhitelistManagementClient.js +0 -269
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/types.d.ts +0 -992
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/types.js +0 -106
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/platform/express/index.d.ts +0 -30
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/platform/express/index.js +0 -136
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/testing-helper.d.ts +0 -31
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/testing-helper.js +0 -77
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/utils.d.ts +0 -53
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/utils.js +0 -353
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/version.d.ts +0 -1
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/version.js +0 -15
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/types/graphql.v2.d.ts +0 -6241
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/types/graphql.v2.js +0 -261
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/types/index.d.ts +0 -7
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/types/index.js +0 -13
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/CHANGELOG.md +0 -413
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/LICENSE +0 -19
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/README.md +0 -709
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/UPGRADE_GUIDE.md +0 -162
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/dist/axios.js +0 -1715
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/dist/axios.map +0 -1
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/dist/axios.min.js +0 -3
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/dist/axios.min.map +0 -1
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/index.d.ts +0 -157
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/index.js +0 -1
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/adapters/README.md +0 -37
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/adapters/http.js +0 -279
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/adapters/xhr.js +0 -180
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/axios.js +0 -53
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/cancel/Cancel.js +0 -19
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/cancel/CancelToken.js +0 -57
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/cancel/isCancel.js +0 -5
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/core/Axios.js +0 -94
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/core/InterceptorManager.js +0 -52
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/core/README.md +0 -7
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/core/buildFullPath.js +0 -20
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/core/createError.js +0 -18
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/core/dispatchRequest.js +0 -79
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/core/enhanceError.js +0 -42
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/core/mergeConfig.js +0 -73
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/core/settle.js +0 -25
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/core/transformData.js +0 -20
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/defaults.js +0 -97
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/helpers/README.md +0 -7
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/helpers/bind.js +0 -11
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/helpers/buildURL.js +0 -71
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/helpers/combineURLs.js +0 -14
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/helpers/cookies.js +0 -53
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/helpers/deprecatedMethod.js +0 -24
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/helpers/isAbsoluteURL.js +0 -14
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/helpers/isURLSameOrigin.js +0 -68
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/helpers/normalizeHeaderName.js +0 -12
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/helpers/parseHeaders.js +0 -53
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/helpers/spread.js +0 -27
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/utils.js +0 -344
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/package.json +0 -84
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/follow-redirects/LICENSE +0 -18
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/follow-redirects/README.md +0 -155
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/follow-redirects/http.js +0 -1
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/follow-redirects/https.js +0 -1
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/follow-redirects/index.js +0 -322
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/follow-redirects/package.json +0 -60
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/package.json +0 -129
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/tests/index.html +0 -21
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/tsconfig.brower.json +0 -45
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/tsconfig.node.json +0 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/webpack.config.js +0 -41
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/CHANGELOG.md +0 -685
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/LICENSE +0 -19
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/README.md +0 -800
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/UPGRADE_GUIDE.md +0 -162
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/dist/axios.js +0 -1756
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/dist/axios.map +0 -1
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/dist/axios.min.js +0 -3
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/dist/axios.min.map +0 -1
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/index.d.ts +0 -161
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/index.js +0 -1
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/adapters/README.md +0 -37
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/adapters/http.js +0 -303
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/adapters/xhr.js +0 -179
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/axios.js +0 -56
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/cancel/Cancel.js +0 -19
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/cancel/CancelToken.js +0 -57
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/cancel/isCancel.js +0 -5
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/core/Axios.js +0 -95
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/core/InterceptorManager.js +0 -52
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/core/README.md +0 -7
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/core/buildFullPath.js +0 -20
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/core/createError.js +0 -18
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/core/dispatchRequest.js +0 -79
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/core/enhanceError.js +0 -42
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/core/mergeConfig.js +0 -87
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/core/settle.js +0 -25
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/core/transformData.js +0 -20
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/defaults.js +0 -98
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/helpers/README.md +0 -7
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/helpers/bind.js +0 -11
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/helpers/buildURL.js +0 -70
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/helpers/combineURLs.js +0 -14
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/helpers/cookies.js +0 -53
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/helpers/deprecatedMethod.js +0 -24
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/helpers/isAbsoluteURL.js +0 -14
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/helpers/isAxiosError.js +0 -11
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/helpers/isURLSameOrigin.js +0 -68
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/helpers/normalizeHeaderName.js +0 -12
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/helpers/parseHeaders.js +0 -53
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/helpers/spread.js +0 -27
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/utils.js +0 -351
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/package.json +0 -86
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/CONTRIBUTING.md +0 -28
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/LICENSE +0 -24
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/README.md +0 -249
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/aes.js +0 -234
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/bower.json +0 -35
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/cipher-core.js +0 -890
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/core.js +0 -797
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/crypto-js.js +0 -6059
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/docs/QuickStartGuide.wiki +0 -470
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/enc-base64.js +0 -136
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/enc-hex.js +0 -18
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/enc-latin1.js +0 -18
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/enc-utf16.js +0 -149
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/enc-utf8.js +0 -18
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/evpkdf.js +0 -134
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/format-hex.js +0 -66
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/format-openssl.js +0 -18
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/hmac-md5.js +0 -18
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/hmac-ripemd160.js +0 -18
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/hmac-sha1.js +0 -18
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/hmac-sha224.js +0 -18
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/hmac-sha256.js +0 -18
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/hmac-sha3.js +0 -18
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/hmac-sha384.js +0 -18
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/hmac-sha512.js +0 -18
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/hmac.js +0 -143
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/index.js +0 -18
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/lib-typedarrays.js +0 -76
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/md5.js +0 -268
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/mode-cfb.js +0 -80
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/mode-ctr-gladman.js +0 -116
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/mode-ctr.js +0 -58
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/mode-ecb.js +0 -40
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/mode-ofb.js +0 -54
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/package.json +0 -38
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/pad-ansix923.js +0 -49
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/pad-iso10126.js +0 -44
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/pad-iso97971.js +0 -40
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/pad-nopadding.js +0 -30
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/pad-pkcs7.js +0 -18
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/pad-zeropadding.js +0 -47
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/pbkdf2.js +0 -145
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/rabbit-legacy.js +0 -190
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/rabbit.js +0 -192
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/rc4.js +0 -139
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/ripemd160.js +0 -267
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/sha1.js +0 -150
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/sha224.js +0 -80
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/sha256.js +0 -199
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/sha3.js +0 -326
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/sha384.js +0 -83
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/sha512.js +0 -326
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/tripledes.js +0 -779
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/x64-core.js +0 -304
- data/lib/authing_ruby/test/js_sdk_test/node_modules/debug/CHANGELOG.md +0 -395
- data/lib/authing_ruby/test/js_sdk_test/node_modules/debug/LICENSE +0 -19
- data/lib/authing_ruby/test/js_sdk_test/node_modules/debug/Makefile +0 -58
- data/lib/authing_ruby/test/js_sdk_test/node_modules/debug/README.md +0 -368
- data/lib/authing_ruby/test/js_sdk_test/node_modules/debug/karma.conf.js +0 -70
- data/lib/authing_ruby/test/js_sdk_test/node_modules/debug/node.js +0 -1
- data/lib/authing_ruby/test/js_sdk_test/node_modules/debug/package.json +0 -43
- data/lib/authing_ruby/test/js_sdk_test/node_modules/debug/src/browser.js +0 -195
- data/lib/authing_ruby/test/js_sdk_test/node_modules/debug/src/debug.js +0 -225
- data/lib/authing_ruby/test/js_sdk_test/node_modules/debug/src/index.js +0 -10
- data/lib/authing_ruby/test/js_sdk_test/node_modules/debug/src/node.js +0 -186
- data/lib/authing_ruby/test/js_sdk_test/node_modules/dotenv/CHANGELOG.md +0 -210
- data/lib/authing_ruby/test/js_sdk_test/node_modules/dotenv/LICENSE +0 -23
- data/lib/authing_ruby/test/js_sdk_test/node_modules/dotenv/README.md +0 -275
- data/lib/authing_ruby/test/js_sdk_test/node_modules/dotenv/config.js +0 -11
- data/lib/authing_ruby/test/js_sdk_test/node_modules/dotenv/lib/cli-options.js +0 -13
- data/lib/authing_ruby/test/js_sdk_test/node_modules/dotenv/lib/env-options.js +0 -18
- data/lib/authing_ruby/test/js_sdk_test/node_modules/dotenv/lib/main.js +0 -118
- data/lib/authing_ruby/test/js_sdk_test/node_modules/dotenv/package.json +0 -57
- data/lib/authing_ruby/test/js_sdk_test/node_modules/dotenv/types/index.d.ts +0 -59
- data/lib/authing_ruby/test/js_sdk_test/node_modules/dotenv/types/test.ts +0 -19
- data/lib/authing_ruby/test/js_sdk_test/node_modules/dotenv/types/tsconfig.json +0 -15
- data/lib/authing_ruby/test/js_sdk_test/node_modules/dotenv/types/tslint.json +0 -6
- data/lib/authing_ruby/test/js_sdk_test/node_modules/follow-redirects/LICENSE +0 -18
- data/lib/authing_ruby/test/js_sdk_test/node_modules/follow-redirects/README.md +0 -148
- data/lib/authing_ruby/test/js_sdk_test/node_modules/follow-redirects/debug.js +0 -14
- data/lib/authing_ruby/test/js_sdk_test/node_modules/follow-redirects/http.js +0 -1
- data/lib/authing_ruby/test/js_sdk_test/node_modules/follow-redirects/https.js +0 -1
- data/lib/authing_ruby/test/js_sdk_test/node_modules/follow-redirects/index.js +0 -531
- data/lib/authing_ruby/test/js_sdk_test/node_modules/follow-redirects/package.json +0 -59
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/LICENSE.txt +0 -107
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/README.md +0 -192
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/bin/jsencrypt.js +0 -249
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/bin/jsencrypt.min.js +0 -2
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/bin/jsencrypt.min.js.LICENSE.txt +0 -8
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/JSEncrypt.d.ts +0 -116
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/JSEncrypt.js +0 -186
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/JSEncryptRSAKey.d.ts +0 -142
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/JSEncryptRSAKey.js +0 -315
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/index.d.ts +0 -3
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/index.js +0 -3
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/asn1js/asn1.d.ts +0 -51
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/asn1js/asn1.js +0 -565
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/asn1js/base64.d.ts +0 -5
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/asn1js/base64.js +0 -88
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/asn1js/hex.d.ts +0 -3
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/asn1js/hex.js +0 -64
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/asn1js/int10.d.ts +0 -9
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/asn1js/int10.js +0 -87
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/asn1js/oids.d.ts +0 -9778
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/asn1js/oids.js +0 -1962
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/jsbn/base64.d.ts +0 -3
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/jsbn/base64.js +0 -76
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/jsbn/jsbn.d.ts +0 -98
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/jsbn/jsbn.js +0 -1754
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/jsbn/prng4.d.ts +0 -10
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/jsbn/prng4.js +0 -46
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/jsbn/rng.d.ts +0 -3
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/jsbn/rng.js +0 -76
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/jsbn/rsa.d.ts +0 -23
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/jsbn/rsa.js +0 -373
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/jsbn/util.d.ts +0 -7
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/jsbn/util.js +0 -58
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/jsrsasign/asn1-1.0.js +0 -1593
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/jsrsasign/yahoo.js +0 -69
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/version.json +0 -1
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/package.json +0 -49
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jwt-decode/Gruntfile.js +0 -78
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jwt-decode/LICENSE +0 -21
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jwt-decode/README.md +0 -55
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jwt-decode/bower.json +0 -20
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jwt-decode/build/jwt-decode.js +0 -125
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jwt-decode/build/jwt-decode.min.js +0 -1
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jwt-decode/jwt-decode.html +0 -2
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jwt-decode/lib/atob.js +0 -38
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jwt-decode/lib/base64_url_decode.js +0 -33
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jwt-decode/lib/index.js +0 -26
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jwt-decode/package.json +0 -37
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jwt-decode/standalone.js +0 -16
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jwt-decode/test/tests.js +0 -53
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jwt-decode/test_harness.html +0 -29
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jwt-decode/testem.yml +0 -46
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jwt-decode/testem_dev.yml +0 -1
- data/lib/authing_ruby/test/js_sdk_test/node_modules/ms/index.js +0 -152
- data/lib/authing_ruby/test/js_sdk_test/node_modules/ms/license.md +0 -21
- data/lib/authing_ruby/test/js_sdk_test/node_modules/ms/package.json +0 -37
- data/lib/authing_ruby/test/js_sdk_test/node_modules/ms/readme.md +0 -51
@@ -1,19 +0,0 @@
|
|
1
|
-
Copyright (c) 2014-present Matt Zabriskie
|
2
|
-
|
3
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
4
|
-
of this software and associated documentation files (the "Software"), to deal
|
5
|
-
in the Software without restriction, including without limitation the rights
|
6
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
7
|
-
copies of the Software, and to permit persons to whom the Software is
|
8
|
-
furnished to do so, subject to the following conditions:
|
9
|
-
|
10
|
-
The above copyright notice and this permission notice shall be included in
|
11
|
-
all copies or substantial portions of the Software.
|
12
|
-
|
13
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
14
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
15
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
16
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
17
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
18
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
19
|
-
THE SOFTWARE.
|
@@ -1,800 +0,0 @@
|
|
1
|
-
# axios
|
2
|
-
|
3
|
-
[![npm version](https://img.shields.io/npm/v/axios.svg?style=flat-square)](https://www.npmjs.org/package/axios)
|
4
|
-
[![CDNJS](https://img.shields.io/cdnjs/v/axios.svg?style=flat-square)](https://cdnjs.com/libraries/axios)
|
5
|
-
[![build status](https://img.shields.io/travis/axios/axios/master.svg?style=flat-square)](https://travis-ci.org/axios/axios)
|
6
|
-
[![code coverage](https://img.shields.io/coveralls/mzabriskie/axios.svg?style=flat-square)](https://coveralls.io/r/mzabriskie/axios)
|
7
|
-
[![install size](https://packagephobia.now.sh/badge?p=axios)](https://packagephobia.now.sh/result?p=axios)
|
8
|
-
[![npm downloads](https://img.shields.io/npm/dm/axios.svg?style=flat-square)](http://npm-stat.com/charts.html?package=axios)
|
9
|
-
[![gitter chat](https://img.shields.io/gitter/room/mzabriskie/axios.svg?style=flat-square)](https://gitter.im/mzabriskie/axios)
|
10
|
-
[![code helpers](https://www.codetriage.com/axios/axios/badges/users.svg)](https://www.codetriage.com/axios/axios)
|
11
|
-
|
12
|
-
Promise based HTTP client for the browser and node.js
|
13
|
-
## Table of Contents
|
14
|
-
|
15
|
-
- [Features](#features)
|
16
|
-
- [Browser Support](#browser-support)
|
17
|
-
- [Installing](#installing)
|
18
|
-
- [Example](#example)
|
19
|
-
- [Axios API](#axios-api)
|
20
|
-
- [Request method aliases](#request-method-aliases)
|
21
|
-
- [Concurrency (Deprecated)](#concurrency-deprecated)
|
22
|
-
- [Creating an instance](#creating-an-instance)
|
23
|
-
- [Instance methods](#instance-methods)
|
24
|
-
- [Request Config](#request-config)
|
25
|
-
- [Response Schema](#response-schema)
|
26
|
-
- [Config Defaults](#config-defaults)
|
27
|
-
- [Global axios defaults](#global-axios-defaults)
|
28
|
-
- [Custom instance defaults](#custom-instance-defaults)
|
29
|
-
- [Config order of precedence](#config-order-of-precedence)
|
30
|
-
- [Interceptors](#interceptors)
|
31
|
-
- [Handling Errors](#handling-errors)
|
32
|
-
- [Cancellation](#cancellation)
|
33
|
-
- [Using application/x-www-form-urlencoded format](#using-applicationx-www-form-urlencoded-format)
|
34
|
-
- [Browser](#browser)
|
35
|
-
- [Node.js](#nodejs)
|
36
|
-
- [Query string](#query-string)
|
37
|
-
- [Form data](#form-data)
|
38
|
-
- [Semver](#semver)
|
39
|
-
- [Promises](#promises)
|
40
|
-
- [TypeScript](#typescript)
|
41
|
-
- [Resources](#resources)
|
42
|
-
- [Credits](#credits)
|
43
|
-
- [License](#license)
|
44
|
-
|
45
|
-
## Features
|
46
|
-
|
47
|
-
- Make [XMLHttpRequests](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest) from the browser
|
48
|
-
- Make [http](http://nodejs.org/api/http.html) requests from node.js
|
49
|
-
- Supports the [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) API
|
50
|
-
- Intercept request and response
|
51
|
-
- Transform request and response data
|
52
|
-
- Cancel requests
|
53
|
-
- Automatic transforms for JSON data
|
54
|
-
- Client side support for protecting against [XSRF](http://en.wikipedia.org/wiki/Cross-site_request_forgery)
|
55
|
-
|
56
|
-
## Browser Support
|
57
|
-
|
58
|
-
![Chrome](https://raw.github.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png) | ![Firefox](https://raw.github.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png) | ![Safari](https://raw.github.com/alrra/browser-logos/master/src/safari/safari_48x48.png) | ![Opera](https://raw.github.com/alrra/browser-logos/master/src/opera/opera_48x48.png) | ![Edge](https://raw.github.com/alrra/browser-logos/master/src/edge/edge_48x48.png) | ![IE](https://raw.github.com/alrra/browser-logos/master/src/archive/internet-explorer_9-11/internet-explorer_9-11_48x48.png) |
|
59
|
-
--- | --- | --- | --- | --- | --- |
|
60
|
-
Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | 11 ✔ |
|
61
|
-
|
62
|
-
[![Browser Matrix](https://saucelabs.com/open_sauce/build_matrix/axios.svg)](https://saucelabs.com/u/axios)
|
63
|
-
|
64
|
-
## Installing
|
65
|
-
|
66
|
-
Using npm:
|
67
|
-
|
68
|
-
```bash
|
69
|
-
$ npm install axios
|
70
|
-
```
|
71
|
-
|
72
|
-
Using bower:
|
73
|
-
|
74
|
-
```bash
|
75
|
-
$ bower install axios
|
76
|
-
```
|
77
|
-
|
78
|
-
Using yarn:
|
79
|
-
|
80
|
-
```bash
|
81
|
-
$ yarn add axios
|
82
|
-
```
|
83
|
-
|
84
|
-
Using jsDelivr CDN:
|
85
|
-
|
86
|
-
```html
|
87
|
-
<script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>
|
88
|
-
```
|
89
|
-
|
90
|
-
Using unpkg CDN:
|
91
|
-
|
92
|
-
```html
|
93
|
-
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
|
94
|
-
```
|
95
|
-
|
96
|
-
## Example
|
97
|
-
|
98
|
-
### note: CommonJS usage
|
99
|
-
In order to gain the TypeScript typings (for intellisense / autocomplete) while using CommonJS imports with `require()` use the following approach:
|
100
|
-
|
101
|
-
```js
|
102
|
-
const axios = require('axios').default;
|
103
|
-
|
104
|
-
// axios.<method> will now provide autocomplete and parameter typings
|
105
|
-
```
|
106
|
-
|
107
|
-
Performing a `GET` request
|
108
|
-
|
109
|
-
```js
|
110
|
-
const axios = require('axios');
|
111
|
-
|
112
|
-
// Make a request for a user with a given ID
|
113
|
-
axios.get('/user?ID=12345')
|
114
|
-
.then(function (response) {
|
115
|
-
// handle success
|
116
|
-
console.log(response);
|
117
|
-
})
|
118
|
-
.catch(function (error) {
|
119
|
-
// handle error
|
120
|
-
console.log(error);
|
121
|
-
})
|
122
|
-
.then(function () {
|
123
|
-
// always executed
|
124
|
-
});
|
125
|
-
|
126
|
-
// Optionally the request above could also be done as
|
127
|
-
axios.get('/user', {
|
128
|
-
params: {
|
129
|
-
ID: 12345
|
130
|
-
}
|
131
|
-
})
|
132
|
-
.then(function (response) {
|
133
|
-
console.log(response);
|
134
|
-
})
|
135
|
-
.catch(function (error) {
|
136
|
-
console.log(error);
|
137
|
-
})
|
138
|
-
.then(function () {
|
139
|
-
// always executed
|
140
|
-
});
|
141
|
-
|
142
|
-
// Want to use async/await? Add the `async` keyword to your outer function/method.
|
143
|
-
async function getUser() {
|
144
|
-
try {
|
145
|
-
const response = await axios.get('/user?ID=12345');
|
146
|
-
console.log(response);
|
147
|
-
} catch (error) {
|
148
|
-
console.error(error);
|
149
|
-
}
|
150
|
-
}
|
151
|
-
```
|
152
|
-
|
153
|
-
> **NOTE:** `async/await` is part of ECMAScript 2017 and is not supported in Internet
|
154
|
-
> Explorer and older browsers, so use with caution.
|
155
|
-
|
156
|
-
Performing a `POST` request
|
157
|
-
|
158
|
-
```js
|
159
|
-
axios.post('/user', {
|
160
|
-
firstName: 'Fred',
|
161
|
-
lastName: 'Flintstone'
|
162
|
-
})
|
163
|
-
.then(function (response) {
|
164
|
-
console.log(response);
|
165
|
-
})
|
166
|
-
.catch(function (error) {
|
167
|
-
console.log(error);
|
168
|
-
});
|
169
|
-
```
|
170
|
-
|
171
|
-
Performing multiple concurrent requests
|
172
|
-
|
173
|
-
```js
|
174
|
-
function getUserAccount() {
|
175
|
-
return axios.get('/user/12345');
|
176
|
-
}
|
177
|
-
|
178
|
-
function getUserPermissions() {
|
179
|
-
return axios.get('/user/12345/permissions');
|
180
|
-
}
|
181
|
-
|
182
|
-
Promise.all([getUserAccount(), getUserPermissions()])
|
183
|
-
.then(function (results) {
|
184
|
-
const acct = results[0];
|
185
|
-
const perm = results[1];
|
186
|
-
});
|
187
|
-
```
|
188
|
-
|
189
|
-
## axios API
|
190
|
-
|
191
|
-
Requests can be made by passing the relevant config to `axios`.
|
192
|
-
|
193
|
-
##### axios(config)
|
194
|
-
|
195
|
-
```js
|
196
|
-
// Send a POST request
|
197
|
-
axios({
|
198
|
-
method: 'post',
|
199
|
-
url: '/user/12345',
|
200
|
-
data: {
|
201
|
-
firstName: 'Fred',
|
202
|
-
lastName: 'Flintstone'
|
203
|
-
}
|
204
|
-
});
|
205
|
-
```
|
206
|
-
|
207
|
-
```js
|
208
|
-
// GET request for remote image in node.js
|
209
|
-
axios({
|
210
|
-
method: 'get',
|
211
|
-
url: 'http://bit.ly/2mTM3nY',
|
212
|
-
responseType: 'stream'
|
213
|
-
})
|
214
|
-
.then(function (response) {
|
215
|
-
response.data.pipe(fs.createWriteStream('ada_lovelace.jpg'))
|
216
|
-
});
|
217
|
-
```
|
218
|
-
|
219
|
-
##### axios(url[, config])
|
220
|
-
|
221
|
-
```js
|
222
|
-
// Send a GET request (default method)
|
223
|
-
axios('/user/12345');
|
224
|
-
```
|
225
|
-
|
226
|
-
### Request method aliases
|
227
|
-
|
228
|
-
For convenience aliases have been provided for all supported request methods.
|
229
|
-
|
230
|
-
##### axios.request(config)
|
231
|
-
##### axios.get(url[, config])
|
232
|
-
##### axios.delete(url[, config])
|
233
|
-
##### axios.head(url[, config])
|
234
|
-
##### axios.options(url[, config])
|
235
|
-
##### axios.post(url[, data[, config]])
|
236
|
-
##### axios.put(url[, data[, config]])
|
237
|
-
##### axios.patch(url[, data[, config]])
|
238
|
-
|
239
|
-
###### NOTE
|
240
|
-
When using the alias methods `url`, `method`, and `data` properties don't need to be specified in config.
|
241
|
-
|
242
|
-
### Concurrency (Deprecated)
|
243
|
-
Please use `Promise.all` to replace the below functions.
|
244
|
-
|
245
|
-
Helper functions for dealing with concurrent requests.
|
246
|
-
|
247
|
-
axios.all(iterable)
|
248
|
-
axios.spread(callback)
|
249
|
-
|
250
|
-
### Creating an instance
|
251
|
-
|
252
|
-
You can create a new instance of axios with a custom config.
|
253
|
-
|
254
|
-
##### axios.create([config])
|
255
|
-
|
256
|
-
```js
|
257
|
-
const instance = axios.create({
|
258
|
-
baseURL: 'https://some-domain.com/api/',
|
259
|
-
timeout: 1000,
|
260
|
-
headers: {'X-Custom-Header': 'foobar'}
|
261
|
-
});
|
262
|
-
```
|
263
|
-
|
264
|
-
### Instance methods
|
265
|
-
|
266
|
-
The available instance methods are listed below. The specified config will be merged with the instance config.
|
267
|
-
|
268
|
-
##### axios#request(config)
|
269
|
-
##### axios#get(url[, config])
|
270
|
-
##### axios#delete(url[, config])
|
271
|
-
##### axios#head(url[, config])
|
272
|
-
##### axios#options(url[, config])
|
273
|
-
##### axios#post(url[, data[, config]])
|
274
|
-
##### axios#put(url[, data[, config]])
|
275
|
-
##### axios#patch(url[, data[, config]])
|
276
|
-
##### axios#getUri([config])
|
277
|
-
|
278
|
-
## Request Config
|
279
|
-
|
280
|
-
These are the available config options for making requests. Only the `url` is required. Requests will default to `GET` if `method` is not specified.
|
281
|
-
|
282
|
-
```js
|
283
|
-
{
|
284
|
-
// `url` is the server URL that will be used for the request
|
285
|
-
url: '/user',
|
286
|
-
|
287
|
-
// `method` is the request method to be used when making the request
|
288
|
-
method: 'get', // default
|
289
|
-
|
290
|
-
// `baseURL` will be prepended to `url` unless `url` is absolute.
|
291
|
-
// It can be convenient to set `baseURL` for an instance of axios to pass relative URLs
|
292
|
-
// to methods of that instance.
|
293
|
-
baseURL: 'https://some-domain.com/api/',
|
294
|
-
|
295
|
-
// `transformRequest` allows changes to the request data before it is sent to the server
|
296
|
-
// This is only applicable for request methods 'PUT', 'POST', 'PATCH' and 'DELETE'
|
297
|
-
// The last function in the array must return a string or an instance of Buffer, ArrayBuffer,
|
298
|
-
// FormData or Stream
|
299
|
-
// You may modify the headers object.
|
300
|
-
transformRequest: [function (data, headers) {
|
301
|
-
// Do whatever you want to transform the data
|
302
|
-
|
303
|
-
return data;
|
304
|
-
}],
|
305
|
-
|
306
|
-
// `transformResponse` allows changes to the response data to be made before
|
307
|
-
// it is passed to then/catch
|
308
|
-
transformResponse: [function (data) {
|
309
|
-
// Do whatever you want to transform the data
|
310
|
-
|
311
|
-
return data;
|
312
|
-
}],
|
313
|
-
|
314
|
-
// `headers` are custom headers to be sent
|
315
|
-
headers: {'X-Requested-With': 'XMLHttpRequest'},
|
316
|
-
|
317
|
-
// `params` are the URL parameters to be sent with the request
|
318
|
-
// Must be a plain object or a URLSearchParams object
|
319
|
-
params: {
|
320
|
-
ID: 12345
|
321
|
-
},
|
322
|
-
|
323
|
-
// `paramsSerializer` is an optional function in charge of serializing `params`
|
324
|
-
// (e.g. https://www.npmjs.com/package/qs, http://api.jquery.com/jquery.param/)
|
325
|
-
paramsSerializer: function (params) {
|
326
|
-
return Qs.stringify(params, {arrayFormat: 'brackets'})
|
327
|
-
},
|
328
|
-
|
329
|
-
// `data` is the data to be sent as the request body
|
330
|
-
// Only applicable for request methods 'PUT', 'POST', 'DELETE , and 'PATCH'
|
331
|
-
// When no `transformRequest` is set, must be of one of the following types:
|
332
|
-
// - string, plain object, ArrayBuffer, ArrayBufferView, URLSearchParams
|
333
|
-
// - Browser only: FormData, File, Blob
|
334
|
-
// - Node only: Stream, Buffer
|
335
|
-
data: {
|
336
|
-
firstName: 'Fred'
|
337
|
-
},
|
338
|
-
|
339
|
-
// syntax alternative to send data into the body
|
340
|
-
// method post
|
341
|
-
// only the value is sent, not the key
|
342
|
-
data: 'Country=Brasil&City=Belo Horizonte',
|
343
|
-
|
344
|
-
// `timeout` specifies the number of milliseconds before the request times out.
|
345
|
-
// If the request takes longer than `timeout`, the request will be aborted.
|
346
|
-
timeout: 1000, // default is `0` (no timeout)
|
347
|
-
|
348
|
-
// `withCredentials` indicates whether or not cross-site Access-Control requests
|
349
|
-
// should be made using credentials
|
350
|
-
withCredentials: false, // default
|
351
|
-
|
352
|
-
// `adapter` allows custom handling of requests which makes testing easier.
|
353
|
-
// Return a promise and supply a valid response (see lib/adapters/README.md).
|
354
|
-
adapter: function (config) {
|
355
|
-
/* ... */
|
356
|
-
},
|
357
|
-
|
358
|
-
// `auth` indicates that HTTP Basic auth should be used, and supplies credentials.
|
359
|
-
// This will set an `Authorization` header, overwriting any existing
|
360
|
-
// `Authorization` custom headers you have set using `headers`.
|
361
|
-
// Please note that only HTTP Basic auth is configurable through this parameter.
|
362
|
-
// For Bearer tokens and such, use `Authorization` custom headers instead.
|
363
|
-
auth: {
|
364
|
-
username: 'janedoe',
|
365
|
-
password: 's00pers3cret'
|
366
|
-
},
|
367
|
-
|
368
|
-
// `responseType` indicates the type of data that the server will respond with
|
369
|
-
// options are: 'arraybuffer', 'document', 'json', 'text', 'stream'
|
370
|
-
// browser only: 'blob'
|
371
|
-
responseType: 'json', // default
|
372
|
-
|
373
|
-
// `responseEncoding` indicates encoding to use for decoding responses (Node.js only)
|
374
|
-
// Note: Ignored for `responseType` of 'stream' or client-side requests
|
375
|
-
responseEncoding: 'utf8', // default
|
376
|
-
|
377
|
-
// `xsrfCookieName` is the name of the cookie to use as a value for xsrf token
|
378
|
-
xsrfCookieName: 'XSRF-TOKEN', // default
|
379
|
-
|
380
|
-
// `xsrfHeaderName` is the name of the http header that carries the xsrf token value
|
381
|
-
xsrfHeaderName: 'X-XSRF-TOKEN', // default
|
382
|
-
|
383
|
-
// `onUploadProgress` allows handling of progress events for uploads
|
384
|
-
// browser only
|
385
|
-
onUploadProgress: function (progressEvent) {
|
386
|
-
// Do whatever you want with the native progress event
|
387
|
-
},
|
388
|
-
|
389
|
-
// `onDownloadProgress` allows handling of progress events for downloads
|
390
|
-
// browser only
|
391
|
-
onDownloadProgress: function (progressEvent) {
|
392
|
-
// Do whatever you want with the native progress event
|
393
|
-
},
|
394
|
-
|
395
|
-
// `maxContentLength` defines the max size of the http response content in bytes allowed in node.js
|
396
|
-
maxContentLength: 2000,
|
397
|
-
|
398
|
-
// `maxBodyLength` (Node only option) defines the max size of the http request content in bytes allowed
|
399
|
-
maxBodyLength: 2000,
|
400
|
-
|
401
|
-
// `validateStatus` defines whether to resolve or reject the promise for a given
|
402
|
-
// HTTP response status code. If `validateStatus` returns `true` (or is set to `null`
|
403
|
-
// or `undefined`), the promise will be resolved; otherwise, the promise will be
|
404
|
-
// rejected.
|
405
|
-
validateStatus: function (status) {
|
406
|
-
return status >= 200 && status < 300; // default
|
407
|
-
},
|
408
|
-
|
409
|
-
// `maxRedirects` defines the maximum number of redirects to follow in node.js.
|
410
|
-
// If set to 0, no redirects will be followed.
|
411
|
-
maxRedirects: 5, // default
|
412
|
-
|
413
|
-
// `socketPath` defines a UNIX Socket to be used in node.js.
|
414
|
-
// e.g. '/var/run/docker.sock' to send requests to the docker daemon.
|
415
|
-
// Only either `socketPath` or `proxy` can be specified.
|
416
|
-
// If both are specified, `socketPath` is used.
|
417
|
-
socketPath: null, // default
|
418
|
-
|
419
|
-
// `httpAgent` and `httpsAgent` define a custom agent to be used when performing http
|
420
|
-
// and https requests, respectively, in node.js. This allows options to be added like
|
421
|
-
// `keepAlive` that are not enabled by default.
|
422
|
-
httpAgent: new http.Agent({ keepAlive: true }),
|
423
|
-
httpsAgent: new https.Agent({ keepAlive: true }),
|
424
|
-
|
425
|
-
// `proxy` defines the hostname, port, and protocol of the proxy server.
|
426
|
-
// You can also define your proxy using the conventional `http_proxy` and
|
427
|
-
// `https_proxy` environment variables. If you are using environment variables
|
428
|
-
// for your proxy configuration, you can also define a `no_proxy` environment
|
429
|
-
// variable as a comma-separated list of domains that should not be proxied.
|
430
|
-
// Use `false` to disable proxies, ignoring environment variables.
|
431
|
-
// `auth` indicates that HTTP Basic auth should be used to connect to the proxy, and
|
432
|
-
// supplies credentials.
|
433
|
-
// This will set an `Proxy-Authorization` header, overwriting any existing
|
434
|
-
// `Proxy-Authorization` custom headers you have set using `headers`.
|
435
|
-
// If the proxy server uses HTTPS, then you must set the protocol to `https`.
|
436
|
-
proxy: {
|
437
|
-
protocol: 'https',
|
438
|
-
host: '127.0.0.1',
|
439
|
-
port: 9000,
|
440
|
-
auth: {
|
441
|
-
username: 'mikeymike',
|
442
|
-
password: 'rapunz3l'
|
443
|
-
}
|
444
|
-
},
|
445
|
-
|
446
|
-
// `cancelToken` specifies a cancel token that can be used to cancel the request
|
447
|
-
// (see Cancellation section below for details)
|
448
|
-
cancelToken: new CancelToken(function (cancel) {
|
449
|
-
}),
|
450
|
-
|
451
|
-
// `decompress` indicates whether or not the response body should be decompressed
|
452
|
-
// automatically. If set to `true` will also remove the 'content-encoding' header
|
453
|
-
// from the responses objects of all decompressed responses
|
454
|
-
// - Node only (XHR cannot turn off decompression)
|
455
|
-
decompress: true // default
|
456
|
-
|
457
|
-
}
|
458
|
-
```
|
459
|
-
|
460
|
-
## Response Schema
|
461
|
-
|
462
|
-
The response for a request contains the following information.
|
463
|
-
|
464
|
-
```js
|
465
|
-
{
|
466
|
-
// `data` is the response that was provided by the server
|
467
|
-
data: {},
|
468
|
-
|
469
|
-
// `status` is the HTTP status code from the server response
|
470
|
-
status: 200,
|
471
|
-
|
472
|
-
// `statusText` is the HTTP status message from the server response
|
473
|
-
statusText: 'OK',
|
474
|
-
|
475
|
-
// `headers` the HTTP headers that the server responded with
|
476
|
-
// All header names are lower cased and can be accessed using the bracket notation.
|
477
|
-
// Example: `response.headers['content-type']`
|
478
|
-
headers: {},
|
479
|
-
|
480
|
-
// `config` is the config that was provided to `axios` for the request
|
481
|
-
config: {},
|
482
|
-
|
483
|
-
// `request` is the request that generated this response
|
484
|
-
// It is the last ClientRequest instance in node.js (in redirects)
|
485
|
-
// and an XMLHttpRequest instance in the browser
|
486
|
-
request: {}
|
487
|
-
}
|
488
|
-
```
|
489
|
-
|
490
|
-
When using `then`, you will receive the response as follows:
|
491
|
-
|
492
|
-
```js
|
493
|
-
axios.get('/user/12345')
|
494
|
-
.then(function (response) {
|
495
|
-
console.log(response.data);
|
496
|
-
console.log(response.status);
|
497
|
-
console.log(response.statusText);
|
498
|
-
console.log(response.headers);
|
499
|
-
console.log(response.config);
|
500
|
-
});
|
501
|
-
```
|
502
|
-
|
503
|
-
When using `catch`, or passing a [rejection callback](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/then) as second parameter of `then`, the response will be available through the `error` object as explained in the [Handling Errors](#handling-errors) section.
|
504
|
-
|
505
|
-
## Config Defaults
|
506
|
-
|
507
|
-
You can specify config defaults that will be applied to every request.
|
508
|
-
|
509
|
-
### Global axios defaults
|
510
|
-
|
511
|
-
```js
|
512
|
-
axios.defaults.baseURL = 'https://api.example.com';
|
513
|
-
axios.defaults.headers.common['Authorization'] = AUTH_TOKEN;
|
514
|
-
axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded';
|
515
|
-
```
|
516
|
-
|
517
|
-
### Custom instance defaults
|
518
|
-
|
519
|
-
```js
|
520
|
-
// Set config defaults when creating the instance
|
521
|
-
const instance = axios.create({
|
522
|
-
baseURL: 'https://api.example.com'
|
523
|
-
});
|
524
|
-
|
525
|
-
// Alter defaults after instance has been created
|
526
|
-
instance.defaults.headers.common['Authorization'] = AUTH_TOKEN;
|
527
|
-
```
|
528
|
-
|
529
|
-
### Config order of precedence
|
530
|
-
|
531
|
-
Config will be merged with an order of precedence. The order is library defaults found in [lib/defaults.js](https://github.com/axios/axios/blob/master/lib/defaults.js#L28), then `defaults` property of the instance, and finally `config` argument for the request. The latter will take precedence over the former. Here's an example.
|
532
|
-
|
533
|
-
```js
|
534
|
-
// Create an instance using the config defaults provided by the library
|
535
|
-
// At this point the timeout config value is `0` as is the default for the library
|
536
|
-
const instance = axios.create();
|
537
|
-
|
538
|
-
// Override timeout default for the library
|
539
|
-
// Now all requests using this instance will wait 2.5 seconds before timing out
|
540
|
-
instance.defaults.timeout = 2500;
|
541
|
-
|
542
|
-
// Override timeout for this request as it's known to take a long time
|
543
|
-
instance.get('/longRequest', {
|
544
|
-
timeout: 5000
|
545
|
-
});
|
546
|
-
```
|
547
|
-
|
548
|
-
## Interceptors
|
549
|
-
|
550
|
-
You can intercept requests or responses before they are handled by `then` or `catch`.
|
551
|
-
|
552
|
-
```js
|
553
|
-
// Add a request interceptor
|
554
|
-
axios.interceptors.request.use(function (config) {
|
555
|
-
// Do something before request is sent
|
556
|
-
return config;
|
557
|
-
}, function (error) {
|
558
|
-
// Do something with request error
|
559
|
-
return Promise.reject(error);
|
560
|
-
});
|
561
|
-
|
562
|
-
// Add a response interceptor
|
563
|
-
axios.interceptors.response.use(function (response) {
|
564
|
-
// Any status code that lie within the range of 2xx cause this function to trigger
|
565
|
-
// Do something with response data
|
566
|
-
return response;
|
567
|
-
}, function (error) {
|
568
|
-
// Any status codes that falls outside the range of 2xx cause this function to trigger
|
569
|
-
// Do something with response error
|
570
|
-
return Promise.reject(error);
|
571
|
-
});
|
572
|
-
```
|
573
|
-
|
574
|
-
If you need to remove an interceptor later you can.
|
575
|
-
|
576
|
-
```js
|
577
|
-
const myInterceptor = axios.interceptors.request.use(function () {/*...*/});
|
578
|
-
axios.interceptors.request.eject(myInterceptor);
|
579
|
-
```
|
580
|
-
|
581
|
-
You can add interceptors to a custom instance of axios.
|
582
|
-
|
583
|
-
```js
|
584
|
-
const instance = axios.create();
|
585
|
-
instance.interceptors.request.use(function () {/*...*/});
|
586
|
-
```
|
587
|
-
|
588
|
-
## Handling Errors
|
589
|
-
|
590
|
-
```js
|
591
|
-
axios.get('/user/12345')
|
592
|
-
.catch(function (error) {
|
593
|
-
if (error.response) {
|
594
|
-
// The request was made and the server responded with a status code
|
595
|
-
// that falls out of the range of 2xx
|
596
|
-
console.log(error.response.data);
|
597
|
-
console.log(error.response.status);
|
598
|
-
console.log(error.response.headers);
|
599
|
-
} else if (error.request) {
|
600
|
-
// The request was made but no response was received
|
601
|
-
// `error.request` is an instance of XMLHttpRequest in the browser and an instance of
|
602
|
-
// http.ClientRequest in node.js
|
603
|
-
console.log(error.request);
|
604
|
-
} else {
|
605
|
-
// Something happened in setting up the request that triggered an Error
|
606
|
-
console.log('Error', error.message);
|
607
|
-
}
|
608
|
-
console.log(error.config);
|
609
|
-
});
|
610
|
-
```
|
611
|
-
|
612
|
-
Using the `validateStatus` config option, you can define HTTP code(s) that should throw an error.
|
613
|
-
|
614
|
-
```js
|
615
|
-
axios.get('/user/12345', {
|
616
|
-
validateStatus: function (status) {
|
617
|
-
return status < 500; // Resolve only if the status code is less than 500
|
618
|
-
}
|
619
|
-
})
|
620
|
-
```
|
621
|
-
|
622
|
-
Using `toJSON` you get an object with more information about the HTTP error.
|
623
|
-
|
624
|
-
```js
|
625
|
-
axios.get('/user/12345')
|
626
|
-
.catch(function (error) {
|
627
|
-
console.log(error.toJSON());
|
628
|
-
});
|
629
|
-
```
|
630
|
-
|
631
|
-
## Cancellation
|
632
|
-
|
633
|
-
You can cancel a request using a *cancel token*.
|
634
|
-
|
635
|
-
> The axios cancel token API is based on the withdrawn [cancelable promises proposal](https://github.com/tc39/proposal-cancelable-promises).
|
636
|
-
|
637
|
-
You can create a cancel token using the `CancelToken.source` factory as shown below:
|
638
|
-
|
639
|
-
```js
|
640
|
-
const CancelToken = axios.CancelToken;
|
641
|
-
const source = CancelToken.source();
|
642
|
-
|
643
|
-
axios.get('/user/12345', {
|
644
|
-
cancelToken: source.token
|
645
|
-
}).catch(function (thrown) {
|
646
|
-
if (axios.isCancel(thrown)) {
|
647
|
-
console.log('Request canceled', thrown.message);
|
648
|
-
} else {
|
649
|
-
// handle error
|
650
|
-
}
|
651
|
-
});
|
652
|
-
|
653
|
-
axios.post('/user/12345', {
|
654
|
-
name: 'new name'
|
655
|
-
}, {
|
656
|
-
cancelToken: source.token
|
657
|
-
})
|
658
|
-
|
659
|
-
// cancel the request (the message parameter is optional)
|
660
|
-
source.cancel('Operation canceled by the user.');
|
661
|
-
```
|
662
|
-
|
663
|
-
You can also create a cancel token by passing an executor function to the `CancelToken` constructor:
|
664
|
-
|
665
|
-
```js
|
666
|
-
const CancelToken = axios.CancelToken;
|
667
|
-
let cancel;
|
668
|
-
|
669
|
-
axios.get('/user/12345', {
|
670
|
-
cancelToken: new CancelToken(function executor(c) {
|
671
|
-
// An executor function receives a cancel function as a parameter
|
672
|
-
cancel = c;
|
673
|
-
})
|
674
|
-
});
|
675
|
-
|
676
|
-
// cancel the request
|
677
|
-
cancel();
|
678
|
-
```
|
679
|
-
|
680
|
-
> Note: you can cancel several requests with the same cancel token.
|
681
|
-
|
682
|
-
## Using application/x-www-form-urlencoded format
|
683
|
-
|
684
|
-
By default, axios serializes JavaScript objects to `JSON`. To send data in the `application/x-www-form-urlencoded` format instead, you can use one of the following options.
|
685
|
-
|
686
|
-
### Browser
|
687
|
-
|
688
|
-
In a browser, you can use the [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) API as follows:
|
689
|
-
|
690
|
-
```js
|
691
|
-
const params = new URLSearchParams();
|
692
|
-
params.append('param1', 'value1');
|
693
|
-
params.append('param2', 'value2');
|
694
|
-
axios.post('/foo', params);
|
695
|
-
```
|
696
|
-
|
697
|
-
> Note that `URLSearchParams` is not supported by all browsers (see [caniuse.com](http://www.caniuse.com/#feat=urlsearchparams)), but there is a [polyfill](https://github.com/WebReflection/url-search-params) available (make sure to polyfill the global environment).
|
698
|
-
|
699
|
-
Alternatively, you can encode data using the [`qs`](https://github.com/ljharb/qs) library:
|
700
|
-
|
701
|
-
```js
|
702
|
-
const qs = require('qs');
|
703
|
-
axios.post('/foo', qs.stringify({ 'bar': 123 }));
|
704
|
-
```
|
705
|
-
|
706
|
-
Or in another way (ES6),
|
707
|
-
|
708
|
-
```js
|
709
|
-
import qs from 'qs';
|
710
|
-
const data = { 'bar': 123 };
|
711
|
-
const options = {
|
712
|
-
method: 'POST',
|
713
|
-
headers: { 'content-type': 'application/x-www-form-urlencoded' },
|
714
|
-
data: qs.stringify(data),
|
715
|
-
url,
|
716
|
-
};
|
717
|
-
axios(options);
|
718
|
-
```
|
719
|
-
|
720
|
-
### Node.js
|
721
|
-
|
722
|
-
#### Query string
|
723
|
-
|
724
|
-
In node.js, you can use the [`querystring`](https://nodejs.org/api/querystring.html) module as follows:
|
725
|
-
|
726
|
-
```js
|
727
|
-
const querystring = require('querystring');
|
728
|
-
axios.post('http://something.com/', querystring.stringify({ foo: 'bar' }));
|
729
|
-
```
|
730
|
-
|
731
|
-
or ['URLSearchParams'](https://nodejs.org/api/url.html#url_class_urlsearchparams) from ['url module'](https://nodejs.org/api/url.html) as follows:
|
732
|
-
|
733
|
-
```js
|
734
|
-
const url = require('url');
|
735
|
-
const params = new url.URLSearchParams({ foo: 'bar' });
|
736
|
-
axios.post('http://something.com/', params.toString());
|
737
|
-
```
|
738
|
-
|
739
|
-
You can also use the [`qs`](https://github.com/ljharb/qs) library.
|
740
|
-
|
741
|
-
###### NOTE
|
742
|
-
The `qs` library is preferable if you need to stringify nested objects, as the `querystring` method has known issues with that use case (https://github.com/nodejs/node-v0.x-archive/issues/1665).
|
743
|
-
|
744
|
-
#### Form data
|
745
|
-
|
746
|
-
In node.js, you can use the [`form-data`](https://github.com/form-data/form-data) library as follows:
|
747
|
-
|
748
|
-
```js
|
749
|
-
const FormData = require('form-data');
|
750
|
-
|
751
|
-
const form = new FormData();
|
752
|
-
form.append('my_field', 'my value');
|
753
|
-
form.append('my_buffer', new Buffer(10));
|
754
|
-
form.append('my_file', fs.createReadStream('/foo/bar.jpg'));
|
755
|
-
|
756
|
-
axios.post('https://example.com', form, { headers: form.getHeaders() })
|
757
|
-
```
|
758
|
-
|
759
|
-
Alternatively, use an interceptor:
|
760
|
-
|
761
|
-
```js
|
762
|
-
axios.interceptors.request.use(config => {
|
763
|
-
if (config.data instanceof FormData) {
|
764
|
-
Object.assign(config.headers, config.data.getHeaders());
|
765
|
-
}
|
766
|
-
return config;
|
767
|
-
});
|
768
|
-
```
|
769
|
-
|
770
|
-
## Semver
|
771
|
-
|
772
|
-
Until axios reaches a `1.0` release, breaking changes will be released with a new minor version. For example `0.5.1`, and `0.5.4` will have the same API, but `0.6.0` will have breaking changes.
|
773
|
-
|
774
|
-
## Promises
|
775
|
-
|
776
|
-
axios depends on a native ES6 Promise implementation to be [supported](http://caniuse.com/promises).
|
777
|
-
If your environment doesn't support ES6 Promises, you can [polyfill](https://github.com/jakearchibald/es6-promise).
|
778
|
-
|
779
|
-
## TypeScript
|
780
|
-
axios includes [TypeScript](http://typescriptlang.org) definitions.
|
781
|
-
```typescript
|
782
|
-
import axios from 'axios';
|
783
|
-
axios.get('/user?ID=12345');
|
784
|
-
```
|
785
|
-
|
786
|
-
## Resources
|
787
|
-
|
788
|
-
* [Changelog](https://github.com/axios/axios/blob/master/CHANGELOG.md)
|
789
|
-
* [Upgrade Guide](https://github.com/axios/axios/blob/master/UPGRADE_GUIDE.md)
|
790
|
-
* [Ecosystem](https://github.com/axios/axios/blob/master/ECOSYSTEM.md)
|
791
|
-
* [Contributing Guide](https://github.com/axios/axios/blob/master/CONTRIBUTING.md)
|
792
|
-
* [Code of Conduct](https://github.com/axios/axios/blob/master/CODE_OF_CONDUCT.md)
|
793
|
-
|
794
|
-
## Credits
|
795
|
-
|
796
|
-
axios is heavily inspired by the [$http service](https://docs.angularjs.org/api/ng/service/$http) provided in [Angular](https://angularjs.org/). Ultimately axios is an effort to provide a standalone `$http`-like service for use outside of Angular.
|
797
|
-
|
798
|
-
## License
|
799
|
-
|
800
|
-
[MIT](LICENSE)
|