simplify_truths/http/simplify.http

50 lines
1.0 KiB
HTTP

### GET Atomic Expression
GET {{url}}/simplify/A
### GET Invalid Expression should return 400 Bad Request
GET {{url}}/simplify/A B
> {%
client.test("Status code is 400", () => {
client.assert(response.status === 400, "Response status is not 400");
});
client.test("Content-type is application/json", () => {
client.assert(response.headers.valueOf("content-type") === "application/json", "Content-Type is not application/json")
});
%}
### GET And Expression
< {%
import {expression} from './common.js';
expression("A & B")
%}
GET {{url}}/simplify/{{expression}}
### GET Or Expression
< {%
import {expression} from "./common";
expression("A | B")
%}
GET {{url}}/simplify/{{expression}}
### GET Not Expression
GET {{url}}/simplify/!A
### GET Implication Expression
< {%
import {expression} from "./common";
expression("A => B")
%}
GET {{url}}/simplify/{{expression}}
### GET with table
< {%
import {expression} from "./common";
expression("A & B | C")
%}
GET {{url}}/simplify/table/{{expression}}