Add applications
This commit is contained in:
48
scripts/scratch.http
Normal file
48
scripts/scratch.http
Normal file
@@ -0,0 +1,48 @@
|
||||
POST http://localhost:8080/auth/register
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
"email": "some-user-email@gmail.com",
|
||||
"password": "some-password"
|
||||
}
|
||||
|
||||
> {%
|
||||
client.test("Request executed successfully", function() {
|
||||
client.assert(response.status === 201, "response status is not 200")
|
||||
})
|
||||
client.test("Response content-type is json", function() {
|
||||
const type = response.contentType.mimeType;
|
||||
client.assert(type === "application/json", "Expected 'application/json' but received '" + type + "'");
|
||||
});
|
||||
%}
|
||||
|
||||
###
|
||||
|
||||
POST http://localhost:8080/projects/
|
||||
Content-Type: application/json
|
||||
Authorization: Basic some-user-email@gmail.com some-password
|
||||
|
||||
{
|
||||
"name": "some-project-name"
|
||||
}
|
||||
|
||||
> {%
|
||||
client.test("Request executed successfully", function() {
|
||||
client.assert(response.status === 201, "response status is not 200")
|
||||
})
|
||||
client.test("Response content-type is json", function() {
|
||||
var type = response.contentType.mimeType;
|
||||
client.assert(type === "application/json", "Expected 'application/json' but received '" + type + "'");
|
||||
});
|
||||
%}
|
||||
|
||||
###
|
||||
|
||||
POST http://localhost:8080/applications/
|
||||
Content-Type: application/json
|
||||
Authorization: Basic some-user-email@gmail.com some-password
|
||||
|
||||
{
|
||||
"projectId": 1,
|
||||
"name": "some-application-name"
|
||||
}
|
Reference in New Issue
Block a user