From 4c2fdde4f035de76fe5d755cb013bf9201ca6018 Mon Sep 17 00:00:00 2001 From: Engin Yoeyen Date: Tue, 30 Mar 2021 07:30:52 +0200 Subject: [PATCH] Add more examples --- examples/http-get-json-payload.json | 33 +++++++++++++++++++++++++++++ examples/http-post.json | 15 +++++++++++++ examples/simple-http-get.json | 14 ++++++++++++ examples/with-delay.json | 15 +++++++++++++ mappings/health-endpoint.json | 10 --------- mappings/test-endpoint.json | 10 --------- 6 files changed, 77 insertions(+), 20 deletions(-) create mode 100644 examples/http-get-json-payload.json create mode 100644 examples/http-post.json create mode 100644 examples/simple-http-get.json create mode 100644 examples/with-delay.json delete mode 100644 mappings/health-endpoint.json delete mode 100644 mappings/test-endpoint.json diff --git a/examples/http-get-json-payload.json b/examples/http-get-json-payload.json new file mode 100644 index 0000000..826b1cc --- /dev/null +++ b/examples/http-get-json-payload.json @@ -0,0 +1,33 @@ +{ + "request":{ + "url": "/user", + "method" : "GET" + + }, + "response":{ + "status": 200, + "body": { + "login": "octocat", + "id": 1, + "node_id": "MDQ6VXNlcjE=", + "avatar_url": "https://github.com/images/error/octocat_happy.gif", + "gravatar_id": "", + "url": "https://api.github.com/users/octocat", + "html_url": "https://github.com/octocat", + "name": "monalisa octocat", + "company": "GitHub", + "blog": "https://github.com/blog", + "location": "San Francisco", + "email": "octocat@github.com", + "plan": { + "name": "Medium", + "space": 400, + "private_repos": 20, + "collaborators": 0 + } + }, + "headers":{ + "Content-Type":"application/json" + } + } +} \ No newline at end of file diff --git a/examples/http-post.json b/examples/http-post.json new file mode 100644 index 0000000..ca348d0 --- /dev/null +++ b/examples/http-post.json @@ -0,0 +1,15 @@ +{ + "request":{ + "url": "/tell-me", + "method" : "POST", + "body": "Some message" + + }, + "response":{ + "status": 200, + "body": "Here it is!", + "headers":{ + "Content-Type":"text/plain" + } + } +} \ No newline at end of file diff --git a/examples/simple-http-get.json b/examples/simple-http-get.json new file mode 100644 index 0000000..af9d6ea --- /dev/null +++ b/examples/simple-http-get.json @@ -0,0 +1,14 @@ +{ + "request":{ + "url": "/ping", + "method" : "GET" + + }, + "response":{ + "status": 200, + "body": "pong", + "headers":{ + "Content-Type":"text/plain" + } + } +} \ No newline at end of file diff --git a/examples/with-delay.json b/examples/with-delay.json new file mode 100644 index 0000000..98d5e4b --- /dev/null +++ b/examples/with-delay.json @@ -0,0 +1,15 @@ +{ + "request":{ + "url": "/health", + "method" : "GET" + + }, + "response":{ + "status": 200, + "body": "All healthy", + "headers":{ + "Content-Type":"text/plain" + }, + "withDelay": 2000 + } +} \ No newline at end of file diff --git a/mappings/health-endpoint.json b/mappings/health-endpoint.json deleted file mode 100644 index 320737c..0000000 --- a/mappings/health-endpoint.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "request":{ - "url": "/health", - "method" : "GET" - }, - "response":{ - "status": 200, - "body": "All healthy!" - } -} \ No newline at end of file diff --git a/mappings/test-endpoint.json b/mappings/test-endpoint.json deleted file mode 100644 index ebfdbae..0000000 --- a/mappings/test-endpoint.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "request":{ - "url": "/test", - "method" : "GET" - }, - "response":{ - "status": 200, - "body": "Here it is!\n" - } -} \ No newline at end of file