diff --git a/src/Kiota.Builder/Writers/TypeScript/CodeConstantWriter.cs b/src/Kiota.Builder/Writers/TypeScript/CodeConstantWriter.cs index 9e8879b3eb..4476d55e07 100644 --- a/src/Kiota.Builder/Writers/TypeScript/CodeConstantWriter.cs +++ b/src/Kiota.Builder/Writers/TypeScript/CodeConstantWriter.cs @@ -123,7 +123,7 @@ private void WriteRequestsMetadataConstant(CodeConstant codeElement, LanguageWri else if (!isVoid) writer.WriteLine($"responseBodyFactory: {GetTypeFactory(isVoid, isStream, executorMethod, writer)},"); var sanitizedRequestBodyContentType = executorMethod.RequestBodyContentType.SanitizeDoubleQuote(); - + if (!string.IsNullOrEmpty(sanitizedRequestBodyContentType)) writer.WriteLine($"requestBodyContentType: \"{sanitizedRequestBodyContentType}\","); if (executorMethod.Parameters.FirstOrDefault(static x => x.Kind is CodeParameterKind.RequestBody) is CodeParameter requestBody) @@ -205,7 +205,7 @@ private string GetSendRequestMethodName(bool isVoid, bool isStream, bool isColle else if (isPrimitive) { return isCollection ? "sendCollectionOfPrimitive" : "sendPrimitive"; - } + } else { return isCollection ? "sendCollection" : isStream ? "sendPrimitive" : "send";