Skip to content

Instantly share code, notes, and snippets.

@amitpatelx
Created January 20, 2017 08:22
Show Gist options
  • Save amitpatelx/9e89540d301b27aca3d96ce69256e501 to your computer and use it in GitHub Desktop.
Save amitpatelx/9e89540d301b27aca3d96ce69256e501 to your computer and use it in GitHub Desktop.
Mocking Get All Posts using MounteBank server
{
"port": 9999,
"protocol": "http",
"stubs": [
{
"responses": [
{
"is": {
"statusCode": 200,
"body": "[{\"id\":\"1\",\"title\":\"Awsome Article on MounteBank\",\"content\":\"I am about to write it...keep eyes on it\"},{\"id\":\"2\",\"title\":\"Aaha MounteBank\",\"content\":\"Hope you enjoyed the first part\"}]"
}
}
],
"predicates": [
{
"and": [
{
"equals": {
"method": "GET"
}
},
{
"equals": {
"path": "/posts"
}
}
]
}
]
},
{
"responses": [
{
"is": {
"statusCode": 200
}
}
],
"predicates": [
{
"and": [
{
"equals": {
"method": "GET"
}
},
{
"equals": {
"path": "path"
}
}
]
}
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment