@react-native-hero/network 0.0.4 → 0.0.8
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/{react-native-hero-network.podspec → HeroNetwork.podspec} +1 -1
- package/README.md +36 -8
- package/android/build/.transforms/6401b6ecf91d46493d47a7cae1425ae5/results.bin +1 -0
- package/android/build/.transforms/eeb57ddf43a2a6e78f005db6d0c545c3/results.bin +1 -0
- package/android/build/.transforms/eeb57ddf43a2a6e78f005db6d0c545c3/transformed/debug/com/github/reactnativehero/network/BuildConfig.dex +0 -0
- package/android/build/.transforms/eeb57ddf43a2a6e78f005db6d0c545c3/transformed/debug/com/github/reactnativehero/network/RNTNetworkModule$Companion.dex +0 -0
- package/android/build/.transforms/eeb57ddf43a2a6e78f005db6d0c545c3/transformed/debug/com/github/reactnativehero/network/RNTNetworkModule$createCustomRequestBody$1.dex +0 -0
- package/android/build/.transforms/eeb57ddf43a2a6e78f005db6d0c545c3/transformed/debug/com/github/reactnativehero/network/RNTNetworkModule$download$1.dex +0 -0
- package/android/build/.transforms/eeb57ddf43a2a6e78f005db6d0c545c3/transformed/debug/com/github/reactnativehero/network/RNTNetworkModule$fetch$5.dex +0 -0
- package/android/build/.transforms/eeb57ddf43a2a6e78f005db6d0c545c3/transformed/debug/com/github/reactnativehero/network/RNTNetworkModule$upload$3.dex +0 -0
- package/android/build/.transforms/eeb57ddf43a2a6e78f005db6d0c545c3/transformed/debug/com/github/reactnativehero/network/RNTNetworkModule$upload$formBuilder$1.dex +0 -0
- package/android/build/.transforms/eeb57ddf43a2a6e78f005db6d0c545c3/transformed/debug/com/github/reactnativehero/network/RNTNetworkModule.dex +0 -0
- package/android/build/.transforms/eeb57ddf43a2a6e78f005db6d0c545c3/transformed/debug/com/github/reactnativehero/network/RNTNetworkPackage.dex +0 -0
- package/android/build/.transforms/eeb57ddf43a2a6e78f005db6d0c545c3/transformed/desugar_graph.bin +0 -0
- package/android/build/generated/source/buildConfig/debug/com/github/reactnativehero/network/BuildConfig.java +10 -0
- package/android/build/intermediates/aapt_friendly_merged_manifests/debug/aapt/AndroidManifest.xml +12 -0
- package/android/build/intermediates/aapt_friendly_merged_manifests/debug/aapt/output-metadata.json +16 -0
- package/android/build/intermediates/aar_metadata/debug/aar-metadata.properties +2 -0
- package/android/build/intermediates/annotation_processor_list/debug/annotationProcessors.json +1 -0
- package/android/build/intermediates/compile_library_classes_jar/debug/classes.jar +0 -0
- package/android/build/intermediates/compile_r_class_jar/debug/R.jar +0 -0
- package/android/build/intermediates/compile_symbol_list/debug/R.txt +1856 -0
- package/android/build/intermediates/incremental/mergeDebugJniLibFolders/merger.xml +2 -0
- package/android/build/intermediates/incremental/mergeDebugShaders/merger.xml +2 -0
- package/android/build/intermediates/incremental/packageDebugAssets/merger.xml +2 -0
- package/android/build/intermediates/incremental/packageDebugResources/compile-file-map.properties +1 -0
- package/android/build/intermediates/incremental/packageDebugResources/merger.xml +2 -0
- package/android/build/intermediates/javac/debug/classes/com/github/reactnativehero/network/BuildConfig.class +0 -0
- package/android/build/intermediates/library_java_res/debug/res.jar +0 -0
- package/android/build/intermediates/local_only_symbol_list/debug/R-def.txt +2 -0
- package/android/build/intermediates/manifest_merge_blame_file/debug/manifest-merger-blame-debug-report.txt +18 -0
- package/android/build/intermediates/merged_manifest/debug/AndroidManifest.xml +12 -0
- package/android/build/intermediates/navigation_json/debug/navigation.json +1 -0
- package/android/build/intermediates/packaged_manifests/debug/output-metadata.json +16 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/META-INF/react-native-hero_network_debug.kotlin_module +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/com/github/reactnativehero/network/BuildConfig.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/com/github/reactnativehero/network/RNTNetworkModule$Companion.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/com/github/reactnativehero/network/RNTNetworkModule$createCustomRequestBody$1.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/com/github/reactnativehero/network/RNTNetworkModule$download$1.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/com/github/reactnativehero/network/RNTNetworkModule$fetch$5.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/com/github/reactnativehero/network/RNTNetworkModule$upload$3.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/com/github/reactnativehero/network/RNTNetworkModule$upload$formBuilder$1.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/com/github/reactnativehero/network/RNTNetworkModule.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/com/github/reactnativehero/network/RNTNetworkPackage.class +0 -0
- package/android/build/intermediates/symbol_list_with_package_name/debug/package-aware-r.txt +1376 -0
- package/android/build/kotlin/compileDebugKotlin/build-history.bin +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/inputs/source-to-output.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/inputs/source-to-output.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/inputs/source-to-output.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/inputs/source-to-output.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/inputs/source-to-output.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/inputs/source-to-output.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/inputs/source-to-output.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/proto.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/proto.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/proto.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/proto.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/proto.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/proto.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/proto.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/subtypes.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/subtypes.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/subtypes.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/subtypes.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/subtypes.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/subtypes.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/subtypes.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/supertypes.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/supertypes.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/supertypes.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/supertypes.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/supertypes.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/supertypes.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/jvm/kotlin/supertypes.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/counters.tab +2 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/file-to-id.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/file-to-id.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/file-to-id.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/file-to-id.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/file-to-id.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/file-to-id.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/file-to-id.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/id-to-file.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/id-to-file.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/id-to-file.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/id-to-file.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/id-to-file.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/id-to-file.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/id-to-file.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/lookups.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/lookups.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/lookups.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/lookups.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/lookups.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/lookups.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/caches-jvm/lookups/lookups.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/last-build.bin +0 -0
- package/android/build/outputs/logs/manifest-merger-debug-report.txt +33 -0
- package/android/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin +0 -0
- package/android/build/tmp/kotlin-classes/debug/META-INF/react-native-hero_network_debug.kotlin_module +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/github/reactnativehero/network/RNTNetworkModule$Companion.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/github/reactnativehero/network/RNTNetworkModule$createCustomRequestBody$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/github/reactnativehero/network/RNTNetworkModule$download$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/github/reactnativehero/network/RNTNetworkModule$fetch$5.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/github/reactnativehero/network/RNTNetworkModule$upload$3.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/github/reactnativehero/network/RNTNetworkModule$upload$formBuilder$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/github/reactnativehero/network/RNTNetworkModule.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/github/reactnativehero/network/RNTNetworkPackage.class +0 -0
- package/android/src/main/java/com/github/reactnativehero/network/RNTNetworkModule.kt +90 -15
- package/index.js +8 -0
- package/ios/RNTNetwork/RNTNetwork.m +94 -17
- package/package.json +1 -1
|
@@ -3,7 +3,7 @@ require 'json'
|
|
|
3
3
|
package = JSON.parse(File.read(File.join(__dir__, 'package.json')))
|
|
4
4
|
|
|
5
5
|
Pod::Spec.new do |s|
|
|
6
|
-
s.name = "
|
|
6
|
+
s.name = "HeroNetwork"
|
|
7
7
|
s.version = package['version']
|
|
8
8
|
s.summary = package['description']
|
|
9
9
|
s.license = package['license']
|
package/README.md
CHANGED
|
@@ -43,6 +43,7 @@ import {
|
|
|
43
43
|
CODE,
|
|
44
44
|
download,
|
|
45
45
|
upload,
|
|
46
|
+
fetch,
|
|
46
47
|
} from '@react-native-hero/network'
|
|
47
48
|
|
|
48
49
|
download(
|
|
@@ -55,10 +56,10 @@ download(
|
|
|
55
56
|
function (progress) {
|
|
56
57
|
// [0, 1]
|
|
57
58
|
}
|
|
58
|
-
).then(
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
59
|
+
).then(response => {
|
|
60
|
+
response.name
|
|
61
|
+
response.path
|
|
62
|
+
response.size
|
|
62
63
|
})
|
|
63
64
|
.catch(err => {
|
|
64
65
|
if (err.code === CODE.DOWNLOAD_FAILURE) {
|
|
@@ -77,7 +78,12 @@ upload(
|
|
|
77
78
|
// optional, default value is the file name of path
|
|
78
79
|
fileName: 'a.jpg',
|
|
79
80
|
},
|
|
80
|
-
// optional
|
|
81
|
+
// optional, send request params
|
|
82
|
+
data: {
|
|
83
|
+
key1: 'value1',
|
|
84
|
+
key2: 'value2',
|
|
85
|
+
},
|
|
86
|
+
// optional, set request headers
|
|
81
87
|
headers: {
|
|
82
88
|
|
|
83
89
|
}
|
|
@@ -86,9 +92,9 @@ upload(
|
|
|
86
92
|
function (progress) {
|
|
87
93
|
// [0, 1]
|
|
88
94
|
}
|
|
89
|
-
).then(
|
|
90
|
-
|
|
91
|
-
|
|
95
|
+
).then(response => {
|
|
96
|
+
response.status_code
|
|
97
|
+
response.body
|
|
92
98
|
})
|
|
93
99
|
.catch(err => {
|
|
94
100
|
if (err.code === CODE.UPLOAD_FAILURE) {
|
|
@@ -96,4 +102,26 @@ upload(
|
|
|
96
102
|
}
|
|
97
103
|
})
|
|
98
104
|
|
|
105
|
+
fetch({
|
|
106
|
+
url: '',
|
|
107
|
+
methods: 'post',
|
|
108
|
+
// optional, send request params
|
|
109
|
+
data: {
|
|
110
|
+
key1: 'value1',
|
|
111
|
+
key2: 'value2',
|
|
112
|
+
},
|
|
113
|
+
// optional, set request headers
|
|
114
|
+
headers: {
|
|
115
|
+
|
|
116
|
+
}
|
|
117
|
+
})
|
|
118
|
+
.then(response => {
|
|
119
|
+
response.status_code
|
|
120
|
+
response.body
|
|
121
|
+
})
|
|
122
|
+
.catch(err => {
|
|
123
|
+
if (err.code === CODE.FETCH_FAILURE) {
|
|
124
|
+
console.log('fetch error')
|
|
125
|
+
}
|
|
126
|
+
})
|
|
99
127
|
```
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
i/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
o/debug
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/android/build/.transforms/eeb57ddf43a2a6e78f005db6d0c545c3/transformed/desugar_graph.bin
ADDED
|
Binary file
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Automatically generated file. DO NOT MODIFY
|
|
3
|
+
*/
|
|
4
|
+
package com.github.reactnativehero.network;
|
|
5
|
+
|
|
6
|
+
public final class BuildConfig {
|
|
7
|
+
public static final boolean DEBUG = Boolean.parseBoolean("true");
|
|
8
|
+
public static final String LIBRARY_PACKAGE_NAME = "com.github.reactnativehero.network";
|
|
9
|
+
public static final String BUILD_TYPE = "debug";
|
|
10
|
+
}
|
package/android/build/intermediates/aapt_friendly_merged_manifests/debug/aapt/AndroidManifest.xml
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
|
3
|
+
package="com.github.reactnativehero.network" >
|
|
4
|
+
|
|
5
|
+
<uses-sdk
|
|
6
|
+
android:minSdkVersion="21"
|
|
7
|
+
android:targetSdkVersion="30" />
|
|
8
|
+
|
|
9
|
+
<uses-permission android:name="android.permission.INTERNET" />
|
|
10
|
+
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
|
11
|
+
|
|
12
|
+
</manifest>
|
package/android/build/intermediates/aapt_friendly_merged_manifests/debug/aapt/output-metadata.json
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 2,
|
|
3
|
+
"artifactType": {
|
|
4
|
+
"type": "AAPT_FRIENDLY_MERGED_MANIFESTS",
|
|
5
|
+
"kind": "Directory"
|
|
6
|
+
},
|
|
7
|
+
"applicationId": "com.github.reactnativehero.network",
|
|
8
|
+
"variantName": "debug",
|
|
9
|
+
"elements": [
|
|
10
|
+
{
|
|
11
|
+
"type": "SINGLE",
|
|
12
|
+
"filters": [],
|
|
13
|
+
"outputFile": "AndroidManifest.xml"
|
|
14
|
+
}
|
|
15
|
+
]
|
|
16
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{}
|
|
Binary file
|