Skip to content

Commit 6167046

Browse files
committed
readme/doc
1 parent 3e005fe commit 6167046

File tree

3 files changed

+128
-129
lines changed

3 files changed

+128
-129
lines changed

README.md

Lines changed: 126 additions & 127 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
2121
<h1 align="center">@nativescript-community/https</h1>
2222
<p align="center">
23-
<a href="https://npmcharts.com/compare/@nativescript-community/https?minimal=true"><img alt="Downloads per month" src="https://img.shields.io/npm/dm/@nativescript-community/https.svg" height="20"/></a>
23+
<a href="https://npmcharts.com/compare/@nativescript-community/https?minimal=true"><img alt="Downloads per month" src="https://img.shields.io/npm/dm/@nativescript-community/https.svg" height="20"/></a>
2424
<a href="https://www.npmjs.com/package/@nativescript-community/https"><img alt="NPM Version" src="https://img.shields.io/npm/v/@nativescript-community/https.svg" height="20"/></a>
2525
</p>
2626

@@ -32,53 +32,53 @@
3232
<br />
3333

3434

35-
36-
[](#table-of-contents)
37-
38-
39-
[](#table-of-contents)
40-
35+
36+
[](#table-of-contents)
37+
38+
39+
[](#table-of-contents)
40+
4141
## Table of Contents
4242

43-
* [Installation](#installation)
44-
* [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)
52-
* [Enabling SSL pinning](#enabling-ssl-pinning)
53-
* [Disabling SSL pinning](#disabling-ssl-pinning)
54-
* [useLegacy](#uselegacy)
55-
* [Cookie](#cookie)
56-
* [Enabling Cache](#enabling-cache)
57-
* [Multipart form data](#multipart-form-data)
58-
* [Options](#options)
59-
* [Webpack / bundling](#webpack--bundling)
60-
* [`iOS` Troubleshooting](#ios-troubleshooting)
61-
* [`Android` troubleshooting](#android-troubleshooting)
62-
* [Thanks](#thanks)
63-
* [Examples:](#examples-1)
64-
* [Demos and Development](#demos-and-development)
65-
* [Repo Setup](#repo-setup)
66-
* [Build](#build)
67-
* [Demos](#demos)
68-
* [Contributing](#contributing)
69-
* [Update repo ](#update-repo-)
70-
* [Update readme ](#update-readme-)
71-
* [Update doc ](#update-doc-)
72-
* [Publish](#publish)
73-
* [modifying submodules](#modifying-submodules)
43+
* [Installation](#installation)
44+
* [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)
52+
* [Enabling SSL pinning](#enabling-ssl-pinning)
53+
* [Disabling SSL pinning](#disabling-ssl-pinning)
54+
* [useLegacy](#uselegacy)
55+
* [Cookie](#cookie)
56+
* [Enabling Cache](#enabling-cache)
57+
* [Multipart form data](#multipart-form-data)
58+
* [Options](#options)
59+
* [Webpack / bundling](#webpack--bundling)
60+
* [`iOS` Troubleshooting](#ios-troubleshooting)
61+
* [`Android` troubleshooting](#android-troubleshooting)
62+
* [Thanks](#thanks)
63+
* [Examples:](#examples-1)
64+
* [Demos and Development](#demos-and-development)
65+
* [Repo Setup](#repo-setup)
66+
* [Build](#build)
67+
* [Demos](#demos)
68+
* [Contributing](#contributing)
69+
* [Update repo ](#update-repo-)
70+
* [Update readme ](#update-readme-)
71+
* [Update doc ](#update-doc-)
72+
* [Publish](#publish)
73+
* [modifying submodules](#modifying-submodules)
7474
* [Questions](#questions)
7575

76-
77-
[](#installation)
78-
79-
80-
[](#installation)
81-
76+
77+
[](#installation)
78+
79+
80+
[](#installation)
81+
8282
## Installation
8383
Run the following command from the root of your project:
8484

@@ -92,12 +92,12 @@ Easily integrate the most reliable native networking libraries with the latest a
9292
9393
#### A drop-in replacement for the [default http module](https://docs.nativescript.org/cookbook/http).
9494

95-
96-
[](#features)
97-
98-
99-
[](#features)
100-
95+
96+
[](#features)
97+
98+
99+
[](#features)
100+
101101
## Features
102102

103103
- Modern TLS & SSL security features
@@ -110,12 +110,12 @@ Easily integrate the most reliable native networking libraries with the latest a
110110
- Cache
111111
- Basic Cookie support
112112

113-
114-
[](#faq)
115-
116-
117-
[](#faq)
118-
113+
114+
[](#faq)
115+
116+
117+
[](#faq)
118+
119119
## FAQ
120120

121121
> 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
127127
**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.
128128

129129

130-
131-
[](#installation)
132-
133-
134-
[](#installation)
135-
130+
131+
[](#installation)
132+
133+
134+
[](#installation)
135+
136136
## Installation
137137

138138
```bash
139139
tns plugin add @nativescript-community/https
140140
```
141141

142-
143-
[](#examples)
144-
145-
146-
[](#examples)
147-
142+
143+
[](#examples)
144+
145+
146+
[](#examples)
147+
148148
## Examples
149149

150150
### Hitting an API using `GET` method
@@ -164,12 +164,12 @@ Https.request({
164164
});
165165
```
166166

167-
168-
[](#configuration)
169-
170-
171-
[](#configuration)
172-
167+
168+
[](#configuration)
169+
170+
171+
[](#configuration)
172+
173173
## Configuration
174174

175175
### Installing your SSL certificate
@@ -273,23 +273,23 @@ export interface HttpsRequestOptions extends HTTPOptions {
273273
| `cachePolicy?: 'noCache' | 'onlyCache' | 'ignoreCache'` | Set the cache policy to use with that request. This only works with GET requests for now. |
274274
| `onProgress?: (current: number, total: number) => void` | [IOS only] Set the progress callback. |
275275

276-
277-
[](#webpack--bundling)
278-
279-
280-
[](#webpack--bundling)
281-
276+
277+
[](#webpack--bundling)
278+
279+
280+
[](#webpack--bundling)
281+
282282
## Webpack / bundling
283283

284284
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)),
285285
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).
286286

287-
288-
[](#ios-troubleshooting)
289-
290-
291-
[](#ios-troubleshooting)
292-
287+
288+
[](#ios-troubleshooting)
289+
290+
291+
[](#ios-troubleshooting)
292+
293293
## `iOS` Troubleshooting
294294

295295
> ### Please educate yourself on iOS's [App Transport Security](https://github.com/codepath/ios_guides/wiki/App-Transport-Security) before starting beef!
@@ -307,24 +307,23 @@ You can bypass this behavior by adding the following to your projects `Info.plis
307307

308308
> This plugin **does not** add `NSAllowsArbitraryLoads` to your projects `Info.plist` for you.
309309
310-
311-
[](#android-troubleshooting)
312-
313-
314-
[](#android-troubleshooting)
315-
310+
311+
[](#android-troubleshooting)
312+
313+
314+
[](#android-troubleshooting)
315+
316316
## `Android` troubleshooting
317317

318-
* If you app crashes with a message that it's doing too much networking on the main thread,
318+
If you app crashes with a message that it's doing too much networking on the main thread,
319319
then pass the option `allowLargeResponse` with value `true` to the `request` function.
320-
* When using `useLegacy` (which is the default) `content.toString()` and `content.toJSON()` might throw `android.os.NetworkOnMainThreadException` if called from the main thread (seems to depend on response headers). Either call those from a background thread or use `content.toStringAsync()` or `content.toJSONAsync()`
321-
* once you've called `content.[toString,toStringAsync,toJSON,toJSONAsync,...]` the response is closed and will throw `java.lang.IllegalStateException: closed` if called again. So choose the right one and only call once. The reason is that we need to close the response so that you dont have too.
322-
323-
[](#thanks)
324-
325-
326-
[](#thanks)
327320

321+
322+
[](#thanks)
323+
324+
325+
[](#thanks)
326+
328327
# Thanks
329328

330329
| Who | Why |
@@ -340,12 +339,12 @@ then pass the option `allowLargeResponse` with value `true` to the `request` fun
340339
- [Basic](demo-snippets/vue/Basic.vue)
341340
- A basic example
342341

343-
344-
[](#demos-and-development)
345-
346-
347-
[](#demos-and-development)
348-
342+
343+
[](#demos-and-development)
344+
345+
346+
[](#demos-and-development)
347+
349348
## Demos and Development
350349

351350

@@ -385,12 +384,12 @@ Demo setup is a bit special in the sense that if you want to modify/add demos yo
385384
Instead you work in `demo-snippets/[ng|react|svelte|vue]`
386385
You can start from the `install.ts` of each flavor to see how to register new demos
387386

388-
389-
[](#contributing)
390-
391-
392-
[](#contributing)
393-
387+
388+
[](#contributing)
389+
390+
391+
[](#contributing)
392+
394393
## Contributing
395394

396395
### Update repo
@@ -438,18 +437,18 @@ One easy solution is t modify `~/.gitconfig` and add
438437
pushInsteadOf = https://github.com/
439438
```
440439

441-
442-
[](#questions)
443-
444-
445-
[](#questions)
446-
440+
441+
[](#questions)
442+
443+
444+
[](#questions)
445+
447446
## Questions
448447

449448
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).
450-
451-
[](#demos-and-development)
452-
449+
450+
[](#demos-and-development)
451+
453452
## Demos and Development
454453

455454

@@ -489,9 +488,9 @@ Demo setup is a bit special in the sense that if you want to modify/add demos yo
489488
Instead you work in `demo-snippets/[ng|react|svelte|vue]`
490489
You can start from the `install.ts` of each flavor to see how to register new demos
491490

492-
493-
[](#contributing)
494-
491+
492+
[](#contributing)
493+
495494
## Contributing
496495

497496
### Update repo
@@ -538,9 +537,9 @@ One easy solution is t modify `~/.gitconfig` and add
538537
[url "ssh://[email protected]/"]
539538
pushInsteadOf = https://github.com/
540539
```
541-
542-
[](#questions)
543-
540+
541+
[](#questions)
542+
544543
## Questions
545544

546545
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).

docs/assets/navigation.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/assets/search.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)