New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-native-fetch-blob

Package Overview
Dependencies
Maintainers
1
Versions
100
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-fetch-blob - npm Package Compare versions

Comparing version 0.2.2 to 0.2.3

.npmignore

2

package.json
{
"name": "react-native-fetch-blob",
"version": "0.2.2",
"version": "0.2.3",
"description": "A react-native plugin for fetch blob data via HTTP.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -24,28 +24,2 @@ # react-native-fetch-blob

## API
#### `Promise<FetchBlobResponse> fetch(url, headers, body)`
Send a HTTP request uses given headers and body, and return a Promise.
#### url:`string` Required
HTTP request destination url.
#### headers:`object` (Optional)
Headers of HTTP request, value of headers should be `stringified`.
#### body:`string` (Optional)
Body of the HTTP request, body MUST be a BASE64 string, this string will be converted into byte array in native code.
### FetchBlobResponse
When `fetch` success, it resolve a `FetchBlobResponse` object as first argument. `FetchBlobResponse` object has the following methods (these method are synchronous, so you might take quite a performance impact if the file is big):
#### base64():string
returns base64 string of response data (done in native context)
#### json():object
returns json parsed object (done in js context)
#### text():string
returns decoded base64 string (done in js context)
#### blob():Blob
returns Blob object (one in js context)
## Usage

@@ -105,2 +79,28 @@

## API
#### `Promise<FetchBlobResponse> fetch(url, headers, body)`
Send a HTTP request uses given headers and body, and return a Promise.
#### url:`string` Required
HTTP request destination url.
#### headers:`object` (Optional)
Headers of HTTP request, value of headers should be `stringified`.
#### body:`string` (Optional)
Body of the HTTP request, body MUST be a BASE64 string, this string will be converted into byte array in native code.
### FetchBlobResponse
When `fetch` success, it resolve a `FetchBlobResponse` object as first argument. `FetchBlobResponse` object has the following methods (these method are synchronous, so you might take quite a performance impact if the file is big):
#### base64():string
returns base64 string of response data (done in native context)
#### json():object
returns json parsed object (done in js context)
#### text():string
returns decoded base64 string (done in js context)
#### blob():Blob
returns Blob object (one in js context)
### TODO

@@ -107,0 +107,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc