diff --git a/powershell/cmdlets/class.ts b/powershell/cmdlets/class.ts index d111b61989c..101a26bafde 100644 --- a/powershell/cmdlets/class.ts +++ b/powershell/cmdlets/class.ts @@ -1307,14 +1307,14 @@ export class CmdletClass extends Class { description: `the body result as a ${each.language.csharp?.responseType} from the remote call` })); } - if (each.language.csharp?.headerType) { - parameters.push(new Parameter('headers', System.Threading.Tasks.Task({ declaration: each.language.csharp.headerType }), { description: `the header result as a from the remote call` })); - } - + if (isBinary) { parameters.push(new Parameter('response', System.Threading.Tasks.Task({ declaration: 'global::System.IO.Stream' }), { description: 'the body result as a from the remote call' })); } - + + if (each.language.csharp?.headerType) { + parameters.push(new Parameter('headers', System.Threading.Tasks.Task({ declaration: each.language.csharp.headerType }), { description: `the header result as a from the remote call` })); + } const override = `override${pascalCase(each.language.csharp?.name || '')}`; const returnNow = new Parameter('returnNow', System.Threading.Tasks.Task(dotnet.Bool), { modifier: ParameterModifier.Ref, description: `/// Determines if the rest of the ${each.language.csharp?.name} method should be processed, or if the method should return immediately (set to true to skip further processing )` }); const overrideResponseMethod = new PartialMethod(override, dotnet.Void, {