@ts-pf/protocol 0.2.1 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/PROTOCOL.md +1 -1
  2. package/package.json +1 -1
package/PROTOCOL.md CHANGED
@@ -40,7 +40,7 @@ x-ts-pf-protocol: 1
40
40
 
41
41
  Procedure path is the nested router keys joined by `/`. Example: `planet.find` → `/rpc/planet/find` when the prefix is `/rpc`.
42
42
 
43
- v1 accepts **POST only**. Other methods return HTTP 405 with `error.code: "METHOD_NOT_ALLOWED"`.
43
+ v1 accepts **POST only**. Other methods return HTTP 405 with `error.code: "METHOD_NOT_ALLOWED"`. A deployment may add a GET bridge in front of the handler (`GET {prefix}/{procedure.path}?input=<JSON>` rewritten to this POST); that is outside the v1 wire, and v1 clients and servers do not depend on it.
44
44
 
45
45
  Servers read the request header `x-ts-pf-protocol`. Absent → accept (plain HTTP clients). Present and equal to `1` (after trimming surrounding whitespace) → accept. Any other value → HTTP 400 with `error.code: "BAD_REQUEST"` and `message: "Unsupported protocol version"`; the response still carries `x-ts-pf-protocol: 1`. The check runs after the method check and before the body is read.
46
46
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ts-pf/protocol",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "Portable JSON RPC envelope, PFError, and PROTOCOL_VERSION",
5
5
  "keywords": [
6
6
  "ts-pf",