react-native-netify
TypeScript icon, indicating that this package has built-in type declarations

0.1.6 • Public • Published

react-native-netify

Native networking library for react native. Use AFNetworking for iOS and FastAndroidNetworking for Android.

Getting started

$ yarn add react-native-netify

Usage

import Netify from 'react-native-netify';
 
// Init module
Netify.init({
    // Set timeout for request
    timeout: 60000,
});
 
Netify.jsonRequest({
    url: apiUrl,
    method: 'post',
    headers: {
        'Content-Type': 'application/json'
    },
    body: {
        name: userName,
    }
})
.then(response => console.log(response))
.catch(error => {
    const { code, message, response } = error;
    console.log(code, message, response);
});

Readme

Keywords

Package Sidebar

Install

npm i react-native-netify

Weekly Downloads

1

Version

0.1.6

License

MIT

Unpacked Size

217 kB

Total Files

81

Last publish

Collaborators

  • tuanluong