react-native/Libraries/Image
Adam Comella ee8496f364 iOS: Support HTTP headers for source prop on <Image> components
Summary:
Allows developers to specify headers to include in the HTTP request
when fetching a remote image. For example, one might leverage this
when fetching an image from an endpoint that requires authentication:

```
<Image
  style={styles.logo}
  source={{
    uri: 'http://facebook.github.io/react/img/logo_og.png',
    headers: {
      Authorization: 'someAuthToken'
    }
  }}
/>
```

Note that the header values must be strings.

Works on iOS and Android.

**Test plan (required)**

- Ran a small example like the one above on iOS and Android and ensured the headers were sent to the server.
- Ran a small example to ensure that \<Image\> components without headers still work.
- Currently using this code in our app.

Adam Comella
Microsoft Corp.
Closes https://github.com/facebook/react-native/pull/7338

Reviewed By: javache

Differential Revision: D3371458

Pulled By: nicklockwood

fbshipit-source-id: cdb24fe2572c3ae3ba82c86ad383af6d85157e20
2016-06-01 10:43:28 -07:00
..
RCTImage.xcodeproj iOS: Enable views to be nested within <Text> 2016-05-31 10:28:25 -07:00
__tests__ Update Jest APIs on fbsource 2016-04-27 19:16:32 -07:00
AssetRegistry.js [ReactNative] Teach flow how to deal with images 2015-08-26 18:26:09 -08:00
AssetSourceResolver.js Fixes OSS build: haste module -> commonJS invariant 2016-03-16 06:57:26 -07:00
GlobalImageStub.js Removed references to isStatic from the codebase 2015-10-13 06:44:30 -07:00
Image.android.js Add Image#getSize for Android 2016-05-20 18:43:38 -07:00
Image.ios.js iOS: Support HTTP headers for source prop on <Image> components 2016-06-01 10:43:28 -07:00
ImageEditor.js CHORE - Remove Trailing Spaces 2016-04-06 09:21:53 -07:00
ImageResizeMode.js Add center ImageResizeMode option 2016-03-19 11:25:24 -07:00
ImageSource.js Fix flow errors 2015-12-31 07:48:29 -08:00
ImageSourcePropType.js iOS: Support HTTP headers for source prop on <Image> components 2016-06-01 10:43:28 -07:00
ImageStore.js Open sourced <ImageEditor>, <ImageStore> for Android 2016-01-27 10:50:54 -08:00
ImageStylePropTypes.js Fix tintColor prop platform in Image 2016-05-09 15:29:24 -07:00
RCTGIFImageDecoder.h Added RCTDataRequestHandler 2015-10-19 09:07:06 -07:00
RCTGIFImageDecoder.m Generalized image decoding and resizing logic 2016-01-20 11:11:13 -08:00
RCTImageBlurUtils.h Add blur effect to RCTImageView 2016-03-17 12:25:40 -07:00
RCTImageBlurUtils.m Add blur effect to RCTImageView 2016-03-17 12:25:40 -07:00
RCTImageEditingManager.h [React Native] open source ImageEditingManager native module 2015-07-29 15:57:48 -08:00
RCTImageEditingManager.m iOS: Support HTTP headers for source prop on <Image> components 2016-06-01 10:43:28 -07:00
RCTImageLoader.h iOS: Support HTTP headers for source prop on <Image> components 2016-06-01 10:43:28 -07:00
RCTImageLoader.m iOS: Support HTTP headers for source prop on <Image> components 2016-06-01 10:43:28 -07:00
RCTImageStoreManager.h RTCImageStoreManager uses NSData instead of UIImage 2015-11-17 09:55:31 -08:00
RCTImageStoreManager.m Generalized image decoding and resizing logic 2016-01-20 11:11:13 -08:00
RCTImageUtils.h Removed placeholder image logic 2016-04-25 03:31:19 -07:00
RCTImageUtils.m Removed placeholder image logic 2016-04-25 03:31:19 -07:00
RCTImageView.h iOS: Enable views to be nested within <Text> 2016-05-31 10:28:25 -07:00
RCTImageView.m iOS: Support HTTP headers for source prop on <Image> components 2016-06-01 10:43:28 -07:00
RCTImageViewManager.h Merged RCTNetworkImageView functionality into RCTStaticImage 2015-07-17 07:43:16 -08:00
RCTImageViewManager.m iOS: Support HTTP headers for source prop on <Image> components 2016-06-01 10:43:28 -07:00
RCTResizeMode.h Generalized image decoding and resizing logic 2016-01-20 11:11:13 -08:00
RCTResizeMode.m Generalized image decoding and resizing logic 2016-01-20 11:11:13 -08:00
RCTXCAssetImageLoader.h Unify XCAsset handling logic 2015-10-12 04:15:27 -07:00
RCTXCAssetImageLoader.m Generalized image decoding and resizing logic 2016-01-20 11:11:13 -08:00
RelativeImageStub.js [ReactNative] Teach flow how to deal with images 2015-08-26 18:26:09 -08:00
resolveAssetSource.js Introduce custom asset resolver to resolveAssetSource(..) 2016-03-15 20:20:27 -07:00