@http4t/bidi-eg
Advanced tools
Comparing version 0.0.142 to 0.0.143
10
api.js
@@ -13,8 +13,8 @@ "use strict"; | ||
exports.routes = { | ||
ready: routes_1.route(requests_1.request('GET', '/probe/ready'), StatusLens_1.response(200, EmptyLens_1.empty())), | ||
live: routes_1.route(requests_1.request('GET', '/probe/live'), StatusLens_1.response(200, EmptyLens_1.empty())), | ||
post: routes_1.route(requests_1.request('POST', '/store', JsonLens_1.json()), StatusLens_1.response(201, JsonLens_1.json())), | ||
get: routes_1.route(requests_1.request('GET', paths_1.path({ id: variables_1.v.segment }, function (p) { return ["store", p.id]; }), JsonLens_1.json()), NotFoundLens_1.maybe(JsonLens_1.json())), | ||
test: routes_1.route(requests_1.request("POST", '/test/store-then-throw', JsonLens_1.json()), StatusLens_1.response(200, EmptyLens_1.empty())) | ||
ready: routes_1.route(requests_1.$request('GET', '/probe/ready'), StatusLens_1.response(200, EmptyLens_1.empty())), | ||
live: routes_1.route(requests_1.$request('GET', '/probe/live'), StatusLens_1.response(200, EmptyLens_1.empty())), | ||
post: routes_1.route(requests_1.$request('POST', '/store', JsonLens_1.json()), StatusLens_1.response(201, JsonLens_1.json())), | ||
get: routes_1.route(requests_1.$request('GET', paths_1.path({ id: variables_1.v.segment }, function (p) { return ["store", p.id]; }), JsonLens_1.json()), NotFoundLens_1.maybe(JsonLens_1.json())), | ||
test: routes_1.route(requests_1.$request("POST", '/test/store-then-throw', JsonLens_1.json()), StatusLens_1.response(200, EmptyLens_1.empty())) | ||
}; | ||
//# sourceMappingURL=api.js.map |
12
api.ts
@@ -7,3 +7,3 @@ import {empty} from "@http4t/bidi/lenses/EmptyLens"; | ||
import {v} from "@http4t/bidi/paths/variables"; | ||
import {request} from "@http4t/bidi/requests"; | ||
import {$request} from "@http4t/bidi/requests"; | ||
import {route, Routes} from "@http4t/bidi/routes"; | ||
@@ -23,21 +23,21 @@ import {HttpResponse} from "@http4t/core/contract"; | ||
ready: route( | ||
request('GET', '/probe/ready'), | ||
$request('GET', '/probe/ready'), | ||
response(200, empty()) | ||
), | ||
live: route( | ||
request('GET', '/probe/live'), | ||
$request('GET', '/probe/live'), | ||
response(200, empty()) | ||
), | ||
post: route( | ||
request('POST', '/store', json<Doc>()), | ||
$request('POST', '/store', json<Doc>()), | ||
response(201, json<{ id: string }, HttpResponse>()) | ||
), | ||
get: route( | ||
request('GET', path({id: v.segment}, p => ["store", p.id]), json()), | ||
$request('GET', path({id: v.segment}, p => ["store", p.id]), json()), | ||
maybe(json<Doc, HttpResponse>()) | ||
), | ||
test: route( | ||
request("POST", '/test/store-then-throw', json<Doc>()), | ||
$request("POST", '/test/store-then-throw', json<Doc>()), | ||
response(200, empty()) | ||
) | ||
} |
{ | ||
"name": "@http4t/bidi-eg", | ||
"version": "0.0.142", | ||
"version": "0.0.143", | ||
"license": "Apache-2.0" | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
74399