From 4baf74a99935f6aa72adbc3003486ed274f92b47 Mon Sep 17 00:00:00 2001 From: kolaente Date: Wed, 25 Jul 2018 22:26:53 +0200 Subject: [PATCH] Added http test files --- REST-Tests/auth.http | 10 ++++++++++ REST-Tests/namespaces.http | 3 +++ 2 files changed, 13 insertions(+) create mode 100644 REST-Tests/auth.http create mode 100644 REST-Tests/namespaces.http diff --git a/REST-Tests/auth.http b/REST-Tests/auth.http new file mode 100644 index 00000000000..2227961c0f2 --- /dev/null +++ b/REST-Tests/auth.http @@ -0,0 +1,10 @@ +### Authorization by token, part 1. Retrieve and save token. +POST http://localhost:8080/api/v1/login +Content-Type: application/json + +{ + "user": "user", + "password": "1234" +} + +> {% client.global.set("auth_token", response.body.token); %} diff --git a/REST-Tests/namespaces.http b/REST-Tests/namespaces.http new file mode 100644 index 00000000000..0b4e86f71e8 --- /dev/null +++ b/REST-Tests/namespaces.http @@ -0,0 +1,3 @@ +# Get all namespaces +GET http://localhost:8080/api/v1/namespaces +Authorization: Bearer {{auth_token}} \ No newline at end of file