diff --git a/src/Zengenti.Contensis.RequestHandler.Application/Middleware/ErrorResources.cs b/src/Zengenti.Contensis.RequestHandler.Application/Middleware/ErrorResources.cs index 813f0dd..92ff5c1 100644 --- a/src/Zengenti.Contensis.RequestHandler.Application/Middleware/ErrorResources.cs +++ b/src/Zengenti.Contensis.RequestHandler.Application/Middleware/ErrorResources.cs @@ -41,7 +41,7 @@ internal static string CreateCurlCallString(RouteInfo routeInfo, string? host = curlUri.Host = host; } - var curlString = $"curl '{curlUri}' \n"; + var curlString = $"curl -k '{curlUri}' `\n"; var disallowedHeaders = EndpointRequestService.DisallowedRequestHeaders; foreach (var header in routeInfo.Headers.Values) { @@ -51,7 +51,7 @@ internal static string CreateCurlCallString(RouteInfo routeInfo, string? host = } var headerValue = header.Value.Count() == 1 ? header.Value.First() : string.Join("; ", header.Value); - curlString += $" -H '{header.Key}: {headerValue}' \n"; + curlString += $" -H '{header.Key}: {headerValue}' `\n"; } return curlString; diff --git a/src/Zengenti.Contensis.RequestHandler.Application/Services/EndpointRequestService.cs b/src/Zengenti.Contensis.RequestHandler.Application/Services/EndpointRequestService.cs index 8d33102..612f8b4 100644 --- a/src/Zengenti.Contensis.RequestHandler.Application/Services/EndpointRequestService.cs +++ b/src/Zengenti.Contensis.RequestHandler.Application/Services/EndpointRequestService.cs @@ -161,7 +161,7 @@ public async Task Invoke( var curlString = ErrorResources.CreateCurlCallString(routeInfo); _logger.LogDebug( - "Invoking endpoint {Uri} was successful with status code {StatusCode}. The equivalent curl command is: {CurlString}", + "Invoking endpoint {Uri} was successful with status code {StatusCode}. The equivalent curl command in PowerShell is: {CurlString}", routeInfo.Uri, endpointResponse.StatusCode, curlString); @@ -213,7 +213,7 @@ public async Task Invoke( _logger.Log( logLevel, - "Invoking endpoint {AbsoluteUri} was not successful: {StatusCode}. The equivalent curl command is: {CurlString}", + "Invoking endpoint {AbsoluteUri} was not successful: {StatusCode}. The equivalent curl command in PowerShell is: {CurlString}", absoluteUri, endpointResponse.StatusCode, curlString); @@ -265,7 +265,7 @@ public async Task Invoke( _logger.LogError( e, - "Failed to invoke {RouteInfoType} endpoint {Uri} with http method {Method}. The equivalent curl command is: {CurlString}", + "Failed to invoke {RouteInfoType} endpoint {Uri} with http method {Method}. The equivalent curl command in PowerShell is: {CurlString}", routeInfoType, routeInfo.Uri, httpMethod.Method,