()
| 27 | const requestFinishedHandler = useCallback( |
| 28 | (harRequest: chrome.devtools.network.Request) => { |
| 29 | async function getCurrentTab() { |
| 30 | try { |
| 31 | harRequest.getContent((content) => { |
| 32 | try { |
| 33 | const contentStr = content || ''; |
| 34 | const wasInserted = requestStore.insert(harRequest, contentStr); |
| 35 | if (!wasInserted) return; |
| 36 | setSpecEndpoints(); |
| 37 | const host = safelyGetURLHost(harRequest.request.url); |
| 38 | if (host && !allHosts.has(host)) { |
| 39 | setAllHosts((prev) => new Set(prev).add(host)); |
| 40 | } |
| 41 | } catch { |
| 42 | return; |
| 43 | } |
| 44 | }); |
| 45 | } catch { |
| 46 | return; |
| 47 | } |
| 48 | } |
| 49 | |
| 50 | getCurrentTab(); |
| 51 | }, |
no test coverage detected