Change Networking examples to use HTTPS.
Summary: Thanks for submitting a pull request! Please provide enough information so that others can review your pull request: > **Unless you are a React Native release maintainer and cherry-picking an *existing* commit into a current release, ensure your pull request is targeting the `master` React Native branch.** Explain the **motivation** for making this change. What existing problem does the pull request solve? Prefer **small pull requests**. These are much easier to review and more likely to get merged. Make sure the PR does only one thing, otherwise please split it. **Test plan (required)** Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the pull request changes UI. Make sure tests pass on both Travis and Circle CI. **Code formatting** Look around. Match the style of the rest of the codebase. See also the simple [style guide](https://github.com/facebook/react-native/blob/master/CONTRIBUTING.md#style-guide). For more info, see Closes https://github.com/facebook/react-native/pull/9388 Differential Revision: D3715004 fbshipit-source-id: c12abcdd54ae1176aaf666eed520b85e2f8db6bd
This commit is contained in:
parent
fbd2e13910
commit
e106a4f094
|
@ -48,7 +48,7 @@ Networking is an inherently asynchronous operation. Fetch methods will return a
|
|||
|
||||
```js
|
||||
getMoviesFromApiAsync() {
|
||||
return fetch('http://facebook.github.io/react-native/movies.json')
|
||||
return fetch('https://facebook.github.io/react-native/movies.json')
|
||||
.then((response) => response.json())
|
||||
.then((responseJson) => {
|
||||
return responseJson.movies;
|
||||
|
@ -64,7 +64,7 @@ You can also use the proposed ES2017 `async`/`await` syntax in a React Native ap
|
|||
```js
|
||||
async getMoviesFromApi() {
|
||||
try {
|
||||
let response = await fetch('http://facebook.github.io/react-native/movies.json');
|
||||
let response = await fetch('https://facebook.github.io/react-native/movies.json');
|
||||
let responseJson = await response.json();
|
||||
return responseJson.movies;
|
||||
} catch(error) {
|
||||
|
|
Loading…
Reference in New Issue