znsio / specmatic

Turn your contracts into executable specifications. Contract Driven Development - Collaboratively Design & Independently Deploy MicroServices & MicroFrontends.
https://specmatic.io
MIT License
275 stars 51 forks source link

Proxy command not working on Specmatic Docker Image #1119

Closed harikrishnan83 closed 4 months ago

harikrishnan83 commented 4 months ago

Description Specmatic proxy command is returning this error for curl requests curl: (56) Recv failure: Connection reset by peer

Steps to reproduce

  1. Run proxy command as shown below and point it to any server that you would like to record docker run -p 9000:9000 -v ./contracts:/usr/src/app/contracts:rw znsio/specmatic:1.3.20 proxy --target http://host.docker.internal:8090/ ./contracts/recorded
  2. Run curl command to hit the proxy server curl http://localhost:9000/products
  3. I see this error. curl: (56) Recv failure: Connection reset by peer

Expected behavior The request is proxied through to the target server and upon stopping the proxy the interactions are captured as an OpenAPI file in ./contracts/recorded folder.

System Information: