Wrap an existing APIs endpoint with Beeceptor endpoint and inspect all the traffic going to the original API.
Beeceptor acts as a proxy-server and helps in inspecting headers and body for HTTP requests.
When you enable proxy mode, you can use rules to mock a few calls and forward the rest to target endpoint. When a rule is matched, Beeceptor serves it.
If no rule matches, the request is forwarded to original target and your application works as usual.
Either you are consuming a webhook or building one, you shall need to inspect and debug HTTP calls.
E.g. Stripe, Zoho, Sendgrid, Jira, Gitlab, IFTTT, Zapier, etc.
CORS Support (preflight requests)
Beeceptor, comes with CORS support and all origins are accepted out of the box. (Access-Control-Allow-Origin: *).
OPTIONS calls will get '200 OK' always.
Simulate latencies & timeouts
Simulate higher latencies by introducing delays and timeouts to the mocking rules. Helps you validate rarely reachable code paths.
Consider you are working on API 'A', and downstream micro-services are 'B' and 'C. Beeceptor can help you mock B and C to test paths that were not possible before. E.g. when B times-out or erred, how does A behave?
Share a request/response sample
An intercepted request can be shared with peers easily. Get a unique permanent link to share with your peers.
One great usage is during SPA development. You need first few ajax request to initialize the page and later mocking new calls. Beeceptor can route requests to original target without breaking your flow.
Load Testing an API
When your API consumes 3rd party APIs, load testing is difficult. Just wrapping an 3rd party API and enable/disable rules helps here. E.g. sending a transactional emails when your API is called - why not mock Sendgrid/SES/MailGun/PostMark APIs.
Production vs New Code
You can switch the target endpoint anytime. This helps you validate a test against deployed code vs new code in development. E.g. does this GET call return same data for new vs old code?
Is the data contract ready between UI and API developer? Just mock the response and unblock UI developers.