Commit 58d9486
Expose DevSupportHttpClient as public API (#55778)
Summary:
Pull Request resolved: #55778
Revert the `DevSupportRequestHeaders` extraction from D94354168 and instead
make `DevSupportHttpClient` itself `public`. This gives external consumers
(e.g. Expo Dev Launcher) direct access to the shared OkHttpClient instances
and the `addRequestHeader`/`removeRequestHeader` methods without needing a
separate intermediary singleton.
Changes:
- Remove `DevSupportRequestHeaders` class and its `request_headers` Buck target
- Change `DevSupportHttpClient` from `internal` to `public`
- Restore `addRequestHeader`/`removeRequestHeader` methods in `DevSupportHttpClient`
- Revert `interfaces` Buck target to include all `interfaces/*.kt` files
- Revert inspector Buck target to remove the `request_headers` dependency
This looks breaking from the API prespective but `DevSupportRequestHeaders` was never shipped, so it's just an addittive change.
Changelog: [Android][Added] - Make DevSupportHttpClient public for custom dev-support HTTP header registration
Reviewed By: cipolleschi
Differential Revision: D94515394
fbshipit-source-id: 709eb0e039f9b0a21d67b042dc9df0fc287720de1 parent fc9940d commit 58d9486
File tree
3 files changed
+32
-61
lines changed- packages/react-native/ReactAndroid
- api
- src/main/java/com/facebook/react/devsupport
- inspector
- interfaces
3 files changed
+32
-61
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2101 | 2101 | | |
2102 | 2102 | | |
2103 | 2103 | | |
| 2104 | + | |
| 2105 | + | |
| 2106 | + | |
| 2107 | + | |
| 2108 | + | |
| 2109 | + | |
| 2110 | + | |
| 2111 | + | |
2104 | 2112 | | |
2105 | 2113 | | |
2106 | 2114 | | |
| |||
2184 | 2192 | | |
2185 | 2193 | | |
2186 | 2194 | | |
2187 | | - | |
2188 | | - | |
2189 | | - | |
2190 | | - | |
2191 | | - | |
2192 | | - | |
2193 | | - | |
2194 | 2195 | | |
2195 | 2196 | | |
2196 | 2197 | | |
| |||
Lines changed: 24 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
20 | | - | |
| 19 | + | |
| 20 | + | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
23 | 25 | | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
34 | 29 | | |
| 30 | + | |
35 | 31 | | |
36 | 32 | | |
37 | 33 | | |
38 | | - | |
| 34 | + | |
39 | 35 | | |
40 | 36 | | |
41 | 37 | | |
| |||
44 | 40 | | |
45 | 41 | | |
46 | 42 | | |
47 | | - | |
| 43 | + | |
48 | 44 | | |
49 | 45 | | |
50 | 46 | | |
51 | 47 | | |
52 | 48 | | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
53 | 61 | | |
Lines changed: 0 additions & 38 deletions
This file was deleted.
0 commit comments