You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* [A drop-in replacement for the [default http module](https://docs.nativescript.org/cookbook/http).](#a-drop-in-replacement-for-the-default-http-modulehttpsdocsnativescriptorgcookbookhttp)
45
-
* [Features](#features)
46
-
* [FAQ](#faq)
47
-
* [Installation](#installation-1)
48
-
* [Examples](#examples)
49
-
* [Hitting an API using `GET` method](#hitting-an-api-using-get-method)
50
-
* [Configuration](#configuration)
51
-
* [Installing your SSL certificate](#installing-your-ssl-certificate)
* [A drop-in replacement for the [default http module](https://docs.nativescript.org/cookbook/http).](#a-drop-in-replacement-for-the-default-http-modulehttpsdocsnativescriptorgcookbookhttp)
45
+
* [Features](#features)
46
+
* [FAQ](#faq)
47
+
* [Installation](#installation-1)
48
+
* [Examples](#examples)
49
+
* [Hitting an API using `GET` method](#hitting-an-api-using-get-method)
50
+
* [Configuration](#configuration)
51
+
* [Installing your SSL certificate](#installing-your-ssl-certificate)
Run the following command from the root of your project:
84
84
@@ -92,12 +92,12 @@ Easily integrate the most reliable native networking libraries with the latest a
92
92
93
93
#### A drop-in replacement for the [default http module](https://docs.nativescript.org/cookbook/http).
94
94
95
-
96
-
[](#features)
97
-
98
-
99
-
[](#features)
100
-
95
+
96
+
[](#features)
97
+
98
+
99
+
[](#features)
100
+
101
101
## Features
102
102
103
103
- Modern TLS & SSL security features
@@ -110,12 +110,12 @@ Easily integrate the most reliable native networking libraries with the latest a
110
110
- Cache
111
111
- Basic Cookie support
112
112
113
-
114
-
[](#faq)
115
-
116
-
117
-
[](#faq)
118
-
113
+
114
+
[](#faq)
115
+
116
+
117
+
[](#faq)
118
+
119
119
## FAQ
120
120
121
121
> What the flip is SSL pinning and all this security mumbo jumbo?
@@ -127,24 +127,24 @@ Easily integrate the most reliable native networking libraries with the latest a
127
127
**No.** This plugin works out of the box without any security configurations needed. Either way you'll still benefit from all the features listed above.
| `cachePolicy?: 'noCache' | 'onlyCache' | 'ignoreCache'` | Set the cache policy to use with that request. This only works with GET requests for now. |
274
274
|`onProgress?: (current: number, total: number) => void`|[IOS only] Set the progress callback. |
275
275
276
-
277
-
[](#webpack--bundling)
278
-
279
-
280
-
[](#webpack--bundling)
281
-
276
+
277
+
[](#webpack--bundling)
278
+
279
+
280
+
[](#webpack--bundling)
281
+
282
282
## Webpack / bundling
283
283
284
284
Since you're probably shipping a certificate with your app (like [our demo does](https://github.com/nativescript-community/https/tree/master/demo/app/assets)),
285
285
make sure it's bundled by Webpack as well. You can do this by [adding the certificate(s) with the `CopyWebpackPlugin`](https://github.com/nativescript-community/https/blob/a5c841c0af7ff6d9994fa23f7fba0df0514c58f1/demo/webpack.config.js#L240).
286
286
287
-
288
-
[](#ios-troubleshooting)
289
-
290
-
291
-
[](#ios-troubleshooting)
292
-
287
+
288
+
[](#ios-troubleshooting)
289
+
290
+
291
+
[](#ios-troubleshooting)
292
+
293
293
## `iOS` Troubleshooting
294
294
295
295
> ### Please educate yourself on iOS's [App Transport Security](https://github.com/codepath/ios_guides/wiki/App-Transport-Security) before starting beef!
@@ -307,23 +307,23 @@ You can bypass this behavior by adding the following to your projects `Info.plis
307
307
308
308
> This plugin **does not** add `NSAllowsArbitraryLoads` to your projects `Info.plist` for you.
309
309
310
-
311
-
[](#android-troubleshooting)
312
-
313
-
314
-
[](#android-troubleshooting)
315
-
310
+
311
+
[](#android-troubleshooting)
312
+
313
+
314
+
[](#android-troubleshooting)
315
+
316
316
## `Android` troubleshooting
317
317
318
318
If you app crashes with a message that it's doing too much networking on the main thread,
319
319
then pass the option `allowLargeResponse` with value `true` to the `request` function.
320
320
321
-
322
-
[](#thanks)
323
-
324
-
325
-
[](#thanks)
326
-
321
+
322
+
[](#thanks)
323
+
324
+
325
+
[](#thanks)
326
+
327
327
# Thanks
328
328
329
329
| Who | Why |
@@ -339,12 +339,12 @@ then pass the option `allowLargeResponse` with value `true` to the `request` fun
339
339
-[Basic](demo-snippets/vue/Basic.vue)
340
340
- A basic example
341
341
342
-
343
-
[](#demos-and-development)
344
-
345
-
346
-
[](#demos-and-development)
347
-
342
+
343
+
[](#demos-and-development)
344
+
345
+
346
+
[](#demos-and-development)
347
+
348
348
## Demos and Development
349
349
350
350
@@ -384,12 +384,12 @@ Demo setup is a bit special in the sense that if you want to modify/add demos yo
384
384
Instead you work in `demo-snippets/[ng|react|svelte|vue]`
385
385
You can start from the `install.ts` of each flavor to see how to register new demos
386
386
387
-
388
-
[](#contributing)
389
-
390
-
391
-
[](#contributing)
392
-
387
+
388
+
[](#contributing)
389
+
390
+
391
+
[](#contributing)
392
+
393
393
## Contributing
394
394
395
395
### Update repo
@@ -437,12 +437,12 @@ One easy solution is t modify `~/.gitconfig` and add
437
437
pushInsteadOf = https://github.com/
438
438
```
439
439
440
-
441
-
[](#questions)
442
-
443
-
444
-
[](#questions)
445
-
440
+
441
+
[](#questions)
442
+
443
+
444
+
[](#questions)
445
+
446
446
## Questions
447
447
448
448
If you have any questions/issues/comments please feel free to create an issue or start a conversation in the [NativeScript Community Discord](https://nativescript.org/discord).
0 commit comments