Commit 99ee571
Add custom request header support to DevSupportHttpClient (facebook#55582)
Summary:
Pull Request resolved: facebook#55582
Add addRequestHeader/removeRequestHeader methods to DevSupportHttpClient. These allow callers to register custom HTTP headers that will be included in all requests made through both the httpClient and websocketClient.
Implemented via a shared OkHttp Interceptor that reads from a ConcurrentHashMap, so headers can be safely added/removed from any thread.
Changelog: [Internal]
Reviewed By: cipolleschi
Differential Revision: D93481539
fbshipit-source-id: e8d6bc4c9d21c65a0f4d95065eaadff776933c551 parent 0ebe6b6 commit 99ee571
File tree
1 file changed
+23
-0
lines changed- packages/react-native/ReactAndroid/src/main/java/com/facebook/react/devsupport/inspector
1 file changed
+23
-0
lines changedLines changed: 23 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
| 14 | + | |
13 | 15 | | |
14 | 16 | | |
15 | 17 | | |
16 | 18 | | |
17 | 19 | | |
18 | 20 | | |
19 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
20 | 32 | | |
21 | 33 | | |
22 | 34 | | |
| 35 | + | |
23 | 36 | | |
24 | 37 | | |
25 | 38 | | |
| |||
32 | 45 | | |
33 | 46 | | |
34 | 47 | | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
35 | 58 | | |
0 commit comments