Mock Responses with no-target proxy

Not applicable

Hi,

I want to create a API proxy that doesn't have a target and should return a hard-coded response. The purpose of creating this API proxy is to mock up my application with a back end proxy till the time the back end is not ready.

Also, is it possible to read this hard-coded response from a configuration file, i.e. when I change the content from the file it gets reflected in the proxy response.

Please suggest how the above can be achieved.

Many Thanks.

1 2 2,514
2 REPLIES 2

Not applicable

I know you were able to resolve your issue. However, here's an article about a Mock API leveraging some Node.js capabilities deployed in Apigee Edge. https://community.apigee.com/articles/2354/how-to-build-an-nodejs-api-proxy-with-mocks.html

Not applicable

Hi @Karan Kapoor, you can also check the little project I have open sourced on GitHub which does exactly that. Its an API bundle which serves responses from the flat files as mock responses.

This is achieved with Node.js component in Apigee. Readme.md file give you some examples. https://github.com/sauliuz/amock