question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support for blobs

See original GitHub issue

Thanks for open sourcing your library! 😃

Blob-support for react-native’s fetch was introduced in 0.54:

https://github.com/facebook/react-native/pull/11417 https://github.com/facebook/react-native/pull/11573

Blobs doesn’t seem to work with your library though:

var blob = new Blob();
pinnedFetch('https://jsonplaceholder.typicode.com/posts/1', {
  method: 'PUT',
  body: blob,
  headers: {
    'Content-Type': 'application/octet-stream',
  },
  sslPinning: {[
    "my.certificate"
  ]},
})
.then(response => response.json())
.then(json => console.warn(json));

Leads to:

Exception '-[__NSDictionaryM dataUsingEncoding:]: unrecognized selector sent to instance 0x1c4239de0' was thrown while invoking fetch on target RNSslPinning with params (
    "https://jsonplaceholder.typicode.com/posts/1",
        {
        body =         {
            "_data" =             {
                blobId = "cc129bc0-f470-405f-80f8-2c115b404e76";
                lastModified = 1535620344891;
                offset = 0;
                size = 0;
                type = "";
            };
        };
        headers =         {
            "Content-Type" = "application/octet-stream";
        };
        method = PUT;
        sslPinning =         {
            certs =             (
                "my.certificate"
            );
        };
    },
    137
)

I need ssl pinning for all my request but haven’t found a library featuring blob PUTs.

Any thoughts on how to support this?

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:7
  • Comments:13 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
MaxToybermancommented, May 8, 2020

@canhtran10 remove the body: null, in GET you shouldn’t add body

1reaction
brunnorechcommented, Feb 18, 2020

Any update on this ? or other alternative ? other library ?

Read more comments on GitHub >

github_iconTop Results From Across the Web

"blob" | Can I use... Support tables for HTML5, CSS3, etc
"Can I use" provides up-to-date browser support tables for support of front-end web technologies on desktop and mobile web browsers.
Read more >
Blob - Web APIs | MDN
The Blob object represents a blob, which is a file-like object of immutable, raw data; they can be read as text or binary...
Read more >
BLOB support
Binary Large Objects (BLOB) support is designed for efficient storage of large objects. An object is considered to be large if it is...
Read more >
Support matrix for Azure Blobs backup
Provides a summary of support settings and limitations when backing up Azure Blobs.
Read more >
Full support of BLOB in ORDA - 4D Blog
Full support of BLOB in ORDA ... Many of you have already taken the leap and started using ORDA. To ease your coding...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found