react-native-nitro-fetch 1.1.1 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/NitroFetch.podspec +1 -1
- package/README.md +1 -1
- package/ios/NitroFetchClient.swift +4 -1
- package/package.json +1 -1
package/NitroFetch.podspec
CHANGED
package/README.md
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
**react-native-nitro-fetch** is a general purpose network fetching library for React Native. It can be used as a drop-in replacement for the built-in `fetch(...)` method, as well as provide additional features like prefetching and workletized mappers.
|
|
14
14
|
|
|
15
15
|
<p align="center">
|
|
16
|
-
<a href="https://margelo.
|
|
16
|
+
<a href="https://fetch.margelo.com"><b>Documentation</b></a>
|
|
17
17
|
</p>
|
|
18
18
|
|
|
19
19
|
## Features
|
|
@@ -218,8 +218,11 @@ final class NitroFetchClient: HybridNitroFetchClientSpec {
|
|
|
218
218
|
)
|
|
219
219
|
NitroDevToolsReporter.reportDataReceived(devToolsId, length: data.count)
|
|
220
220
|
if NitroDevToolsReporter.isTextualContentType(headerDict["Content-Type"] ?? headerDict["content-type"]) {
|
|
221
|
+
// Use the incremental/text API for textual bodies — the byte-based
|
|
222
|
+
// `storeResponseBody` path goes through CDP as base64 regardless of
|
|
223
|
+
// the flag, which makes the DevTools Response panel show base64.
|
|
221
224
|
if let text = String(data: data, encoding: .utf8) {
|
|
222
|
-
NitroDevToolsReporter.
|
|
225
|
+
NitroDevToolsReporter.storeResponseBodyIncremental(devToolsId, text: text)
|
|
223
226
|
}
|
|
224
227
|
} else if data.count > 0 && data.count <= 5 * 1024 * 1024 {
|
|
225
228
|
NitroDevToolsReporter.storeResponseBody(devToolsId, data: data, base64Encoded: true)
|