{"version":"1.0","type":"rich","title":"Stubbing with Faraday","description":"This example shows how to stub HTTP requests in Faraday using its built-in test adapter. The code defines a method that constructs a Faraday connection with the `:test` adapter, registering two stubbed responses: a POST to `/api/service` with a JSON payload and a GET to `/api/another_service` with a query parameter. It then returns this stubbed connection to replace the real one via `Service::Something.stubs(:connection)`. The mock responses are provided as HTTP status 200 with empty headers and predefined response bodies.","provider_name":"VizHub AI Studio","provider_url":"https://next.vizhub.com","html":"<iframe src=\"https://next.vizhub.com/viz/gist-c88717c19c6e376bae05ee614238c6b2?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"1\"></iframe>","width":960,"height":500,"cache_age":3600}