microsoft / dev-proxy

Dev Proxy is an API simulator that helps you effortlessly test your app beyond the happy path.
https://aka.ms/devproxy
MIT License
471 stars 56 forks source link

[BUG]: Broken output for requests with no response content (204 No Content) #820

Closed waldekmastykarz closed 2 months ago

waldekmastykarz commented 2 months ago

Description

When Dev Proxy intercepts a request which doesn't have response content, it prints incorrect output

Expected behaviour

 req   ╭ OPTIONS https://api.sandbox.paypal.com/v1/credit/upstream-messaging-events?disableSetCookie=true&features=disable-set-cookie
 api  ╰ Passed through

Actual behaviour

 req   ╭ OPTIONS https://api.sandbox.paypal.com/v1/credit/upstream-messaging-events?disableSetCookie=true&features=disable-set-cookie

Steps to reproduce

OPTIONS https://api.sandbox.paypal.com/v1/credit/upstream-messaging-events?disableSetCookie=true&features=disable-set-cookie

Dev Proxy Version

latest from main

Operating system (environment)

macOS

Shell

zsh

Configuration file

{
  "$schema": "https://raw.githubusercontent.com/microsoft/dev-proxy/main/schemas/v0.20.0/rc.schema.json",
  "plugins": [
    {
      "name": "RetryAfterPlugin",
      "enabled": true,
      "pluginPath": "~appFolder/plugins/dev-proxy-plugins.dll"
    },
    {
      "name": "GenericRandomErrorPlugin",
      "enabled": true,
      "pluginPath": "~appFolder/plugins/dev-proxy-plugins.dll",
      "configSection": "errorsPaypal"
    }
  ],
  "urlsToWatch": [
    "https://api*.sandbox.paypal.com/v*"
  ],
  "rate": 50,
  "logLevel": "information",
  "newVersionNotification": "stable",
  "errorsPaypal": {
    "errorsFile": "errors-paypal.json"
  }
}

Additional Info

No response