Commit 9032df6
fix(jade): match Python jadepy PIN server behavior exactly
- Use first non-onion URL instead of trying all URLs as fallbacks
- Remove Accept header (Python doesn't set it)
- Use accept parameter only to determine JSON vs form encoding
- Send JSON when accept is "json" or "application/json"
- Send form data otherwise, matching Python requests.post(url, data)
- Add support for GET method (though only POST is used in practice)
This matches the Python jadepy _http_request() function behavior exactly
and should resolve handshake compatibility issues.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent 4d5234f commit 9032df6
1 file changed
Lines changed: 40 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
25 | | - | |
26 | | - | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
27 | 33 | | |
28 | 34 | | |
29 | | - | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
30 | 40 | | |
31 | | - | |
32 | | - | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
33 | 52 | | |
34 | | - | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
35 | 67 | | |
36 | 68 | | |
37 | 69 | | |
38 | 70 | | |
39 | 71 | | |
40 | 72 | | |
41 | 73 | | |
| 74 | + | |
42 | 75 | | |
43 | 76 | | |
44 | 77 | | |
| |||
0 commit comments