super-inflater
Getting started
$ npm install super-inflater --save
OR$ yarn add super-inflater --save
Mostly automatic installation
$ react-native link super-inflater
Manual installation
iOS
- In XCode, in the project navigator, right click
Libraries
➜Add Files to [your project's name]
- Go to
node_modules
➜super-inflater
and addSuperInflater.xcodeproj
- In XCode, in the project navigator, select your project. Add
libSuperInflater.a
to your project'sBuild Phases
➜Link Binary With Libraries
- Run your project (
Cmd+R
)<
Android
- Open up
android/app/src/main/java/[...]/MainActivity.java
- Add
import com.reactlibrary.SuperInflaterPackage;
to the imports at the top of the file - Add
new SuperInflaterPackage()
to the list returned by thegetPackages()
method
- Append the following lines to
android/settings.gradle
:include ':super-inflater' project(':super-inflater').projectDir = new File(rootProject.projectDir, '../node_modules/super-inflater/android')
- Insert the following lines inside the dependencies block in
android/app/build.gradle
:compile project(':super-inflater')
Windows
- In Visual Studio add the
SuperInflater.sln
innode_modules/super-inflater/windows/SuperInflater.sln
folder to their solution, reference from their app. - Open up your
MainPage.cs
app
- Add
using Inflate.SuperInflater;
to the usings at the top of the file - Add
new SuperInflaterPackage()
to theList<IReactPackage>
returned by thePackages
method
Usage
Import
;
Headers, Params & Body
- Use
set, query, send
function to set a header, param, body or useset, query, send
many time to set multiple headers, params, body.
SuperInflater
- Use
timeout
to set timeout for the request
SuperInflater
Request
- Can use normal request, there are all of
get
,post
,put
,delete
. - Inflate request, there are all of
getInflate
,submitInflate
,putInflate
,destroyInflate
- When using normal request:
SuperInflater
-
OR with
inflate
request, requiredplatform
because ofAndroid
is special -
For
get
request usinggetInflate
SuperInflater
- For
post
request usingsubmitInflate
- with
fix
for json body
const body = `{ username: "", password: ""}` SuperInflater
- with
send
forobject
body - with
fix
for json body
const body = username: "${username}" password: "${password}" SuperInflater