proxkey
v0.4.0
Published
Proxy/Mock server for testing build on top of HAPI.js
Downloads
12
Maintainers
Readme
PROXKEY
RELEASE NOTES
- Adding replace object with key & value so now we can change the value on the response automatically by the request.
Mock/Proxy server its your call.
Proxkey will Mock or Proxy your REST or SOAP request.
When to use: let's say you need to test an integration to your system.
- Easy to specify speicific response for specific request.
- Rest Example:
- Request: "bob": [ { "key": "phone_num", "value": "9876543210" } ]
- Response (JSON): "bob" :{ "type": "applicaton/json", "data": "{data: 'bob'}", "code": 200 }
- Response (XML): "bob" :{ "type": "applicaton/xml", "data": "<root><data>bob</data></root>", "code": 200}
- SOAP Example:
- Request: "bob": [{ "key": "root->data->name", "value": "bob" }]
- Response (JSON): "bob" :{ "type": "applicaton/json", "data": "{data: 'bob'}", "code": 200 }
- Response (XML): "bob" :{ "type": "applicaton/xml", "data": "<root><data>bob</data></root>", "code": 200}
Options:
1. You can mock a successful response
2. You can mock a failure response
3. You can proxy the request to any url you want and get back the response.
Why? or When to use?
Lets say you have to Mock a response for testing purposes, or you want to hit production but want zero's changes in your code.