Skip to content

Instantly share code, notes, and snippets.

@tfedyanin
Last active July 5, 2019 12:37
Show Gist options
  • Save tfedyanin/9822ef00bc67628ce88e58391bb488db to your computer and use it in GitHub Desktop.
Save tfedyanin/9822ef00bc67628ce88e58391bb488db to your computer and use it in GitHub Desktop.
DR-HAUS Sign up/in example

### Register

POST {{url}}/api/v0/authorize/signup

Content-Type: application/json

{

"name": "Test Testov",

"username": "tester",

"email": "tester@drhaus.ru",

"password": "tester"

}

### Log in

POST {{url}}/api/v0/authorize/signin

Content-Type: application/json

{
"usernameOrEmail": "tester", "password": "tester"

}

> {%
client.test("Request executed successfully", function() {
client.assert(response.status === 200, "Response status is not 200");

});

client.global.set("accessToken", response.body.accessToken);
%}

### Get AD number one

GET {{url}}/api/v0/ad/1

Authorization: Bearer {{accessToken}}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment