You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Port HTTP transport from ponylang/http to ponylang/courier (#91)
Replace the HTTP handler factory pattern (25 types: 8 requesters +
8 handler factories + 8 handlers + RequestFactory) with courier's
actor-based connection model (6 types: 4 request actors + 1 SSL
factory + 1 shared interface).
Each API call creates a short-lived actor owning an
HTTPClientConnection. Consolidation by response pattern: POST+PATCH
share JsonRequester (differ by method/expected status), DELETE+PUT
share NoContentRequester, paginated+search share LinkedJsonRequester
via a LinkedResultReceiver interface. All actors close their
connection in on_response_complete so the runtime exits promptly.
SSLContextFactory tries the system CA store for verified HTTPS; when
unavailable it falls back to unverified SSL, matching the old
HTTPClient behavior.
Breaking change: Credentials.auth changes from net.TCPConnectAuth
to lori.TCPConnectAuth. Authorization header moves from legacy
"token" format to "Bearer" format (GitHub accepts both).
Public API is otherwise preserved — all operation primitives, model
classes, OO convenience methods, and pagination work the same way.
Copy file name to clipboardExpand all lines: .release-notes/next-release.md
-1Lines changed: 0 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,7 +33,6 @@ end
33
33
gist.update_gist(updates)
34
34
```
35
35
36
-
This also adds three new HTTP infrastructure classes: `HTTPPatch` (PATCH with JSON response), `HTTPPut` (PUT expecting 204), and `HTTPCheck` (GET returning Bool based on status code 204/404).
## Port HTTP transport from ponylang/http to ponylang/courier
2
+
3
+
The HTTP transport layer has been replaced with ponylang/courier, which uses an actor-based connection model instead of the handler factory pattern. All public API operations work the same way, but `Credentials.auth` has changed type.
4
+
5
+
Before:
6
+
```pony
7
+
use "net"
8
+
9
+
let auth = TCPConnectAuth(env.root)
10
+
let creds = Credentials(auth, token)
11
+
```
12
+
13
+
After:
14
+
```pony
15
+
use lori = "lori"
16
+
17
+
let auth = lori.TCPConnectAuth(env.root)
18
+
let creds = Credentials(auth, token)
19
+
```
20
+
21
+
Authorization headers now use `Bearer` format (`Authorization: Bearer <token>`) instead of the legacy `token` format. GitHub accepts both.
4.Creates a short-lived request actor (`JsonRequester` / `NoContentRequester` / `CheckRequester` / `LinkedJsonRequester`) that owns an `HTTPClientConnection` from `ponylang/courier`
82
81
5. On success, JSON is parsed and converted to model via `JsonConverter`
83
82
6. Promise is fulfilled with either the model or a `RequestError`
84
83
@@ -102,7 +101,7 @@ Models have methods that chain to further API calls:
102
101
103
102
### Auth
104
103
105
-
`Credentials` holds a `TCPConnectAuth` and an optional token string. `RequestFactory`sets `User-Agent`, `Accept: application/vnd.github.v3+json`, and `Authorization: token <token>` headers.
104
+
`Credentials` holds a `lori.TCPConnectAuth` and an optional token string. Each request actor sets `User-Agent`, `Accept: application/vnd.github.v3+json`, and `Authorization: Bearer <token>` headers.
106
105
107
106
## Conventions
108
107
@@ -115,7 +114,7 @@ Models have methods that chain to further API calls:
115
114
116
115
## Known TODOs in Code
117
116
118
-
1. Potential HTTP GET duplication with paginated variant (paginated_list.pony)
0 commit comments