diff --git a/examples/node/src/rest/api/v2010/account.ts b/examples/node/src/rest/api/v2010/account.ts index 64c92cdc1..bd64dc28f 100644 --- a/examples/node/src/rest/api/v2010/account.ts +++ b/examples/node/src/rest/api/v2010/account.ts @@ -197,11 +197,14 @@ export class AccountContextImpl implements AccountContext { remove( callback?: (error: Error | null, item?: boolean) => any, ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -214,11 +217,15 @@ export class AccountContextImpl implements AccountContext { fetch( callback?: (error: Error | null, item?: AccountInstance) => any, ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -254,6 +261,7 @@ export class AccountContextImpl implements AccountContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -607,6 +615,7 @@ export function AccountListInstance(version: V2010): AccountListInstance { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; if (params["xTwilioWebhookEnabled"] !== undefined) headers["X-Twilio-Webhook-Enabled"] = params["xTwilioWebhookEnabled"]; @@ -662,6 +671,7 @@ export function AccountListInstance(version: V2010): AccountListInstance { if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/examples/node/src/rest/api/v2010/account/call.ts b/examples/node/src/rest/api/v2010/account/call.ts index 08edabcb0..fc6d59abe 100644 --- a/examples/node/src/rest/api/v2010/account/call.ts +++ b/examples/node/src/rest/api/v2010/account/call.ts @@ -106,11 +106,14 @@ export class CallContextImpl implements CallContext { remove( callback?: (error: Error | null, item?: boolean) => any, ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -123,11 +126,15 @@ export class CallContextImpl implements CallContext { fetch( callback?: (error: Error | null, item?: CallInstance) => any, ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -415,6 +422,7 @@ export function CallListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ diff --git a/examples/node/src/rest/api/v2010/account/call/feedbackCallSummary.ts b/examples/node/src/rest/api/v2010/account/call/feedbackCallSummary.ts index f1edee7dc..0d11b1753 100644 --- a/examples/node/src/rest/api/v2010/account/call/feedbackCallSummary.ts +++ b/examples/node/src/rest/api/v2010/account/call/feedbackCallSummary.ts @@ -120,6 +120,7 @@ export class FeedbackCallSummaryContextImpl const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, diff --git a/examples/node/src/rest/flexApi/v1/call.ts b/examples/node/src/rest/flexApi/v1/call.ts index 578b2d70c..331ea05c0 100644 --- a/examples/node/src/rest/flexApi/v1/call.ts +++ b/examples/node/src/rest/flexApi/v1/call.ts @@ -60,11 +60,15 @@ export class CallContextImpl implements CallContext { update( callback?: (error: Error | null, item?: CallInstance) => any, ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.update({ uri: instance._uri, method: "post", + headers, }); operationPromise = operationPromise.then( diff --git a/examples/node/src/rest/flexApi/v1/credential/aws.ts b/examples/node/src/rest/flexApi/v1/credential/aws.ts index 343e72270..d74c9c601 100644 --- a/examples/node/src/rest/flexApi/v1/credential/aws.ts +++ b/examples/node/src/rest/flexApi/v1/credential/aws.ts @@ -152,11 +152,14 @@ export class AwsContextImpl implements AwsContext { remove( callback?: (error: Error | null, item?: boolean) => any, ): Promise { + const headers: any = {}; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.remove({ uri: instance._uri, method: "delete", + headers, }); operationPromise = instance._version.setPromiseCallback( @@ -169,11 +172,15 @@ export class AwsContextImpl implements AwsContext { fetch( callback?: (error: Error | null, item?: AwsInstance) => any, ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -210,6 +217,7 @@ export class AwsContextImpl implements AwsContext { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, @@ -485,6 +493,7 @@ export function AwsListInstance(version: V1): AwsListInstance { if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({ diff --git a/examples/node/src/rest/flexApi/v1/credential/aws/history.ts b/examples/node/src/rest/flexApi/v1/credential/aws/history.ts index 5905ba494..ad11e62e2 100644 --- a/examples/node/src/rest/flexApi/v1/credential/aws/history.ts +++ b/examples/node/src/rest/flexApi/v1/credential/aws/history.ts @@ -99,6 +99,7 @@ export class HistoryContextImpl implements HistoryContext { }; const headers: any = {}; + headers["Accept"] = "application/json"; const instance = this; let operationVersion = instance._version, diff --git a/examples/node/src/rest/flexApi/v1/credential/newCredentials.ts b/examples/node/src/rest/flexApi/v1/credential/newCredentials.ts index 0c662fd68..42d342f48 100644 --- a/examples/node/src/rest/flexApi/v1/credential/newCredentials.ts +++ b/examples/node/src/rest/flexApi/v1/credential/newCredentials.ts @@ -159,6 +159,7 @@ export function NewCredentialsListInstance( const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ diff --git a/examples/node/src/rest/versionless/deployed_devices/fleet.ts b/examples/node/src/rest/versionless/deployed_devices/fleet.ts index 637f88887..ad7935933 100644 --- a/examples/node/src/rest/versionless/deployed_devices/fleet.ts +++ b/examples/node/src/rest/versionless/deployed_devices/fleet.ts @@ -68,11 +68,15 @@ export class FleetContextImpl implements FleetContext { fetch( callback?: (error: Error | null, item?: FleetInstance) => any, ): Promise { + const headers: any = {}; + headers["Accept"] = "application/json"; + const instance = this; let operationVersion = instance._version, operationPromise = operationVersion.fetch({ uri: instance._uri, method: "get", + headers, }); operationPromise = operationPromise.then( @@ -242,6 +246,7 @@ export function FleetListInstance(version: DeployedDevices): FleetListInstance { const headers: any = {}; headers["Content-Type"] = "application/x-www-form-urlencoded"; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.create({ diff --git a/examples/node/src/rest/versionless/understand/assistant.ts b/examples/node/src/rest/versionless/understand/assistant.ts index 45da858c5..5d875df02 100644 --- a/examples/node/src/rest/versionless/understand/assistant.ts +++ b/examples/node/src/rest/versionless/understand/assistant.ts @@ -169,6 +169,7 @@ export function AssistantListInstance( if (params.pageToken !== undefined) data["PageToken"] = params.pageToken; const headers: any = {}; + headers["Accept"] = "application/json"; let operationVersion = version, operationPromise = operationVersion.page({