Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS: Support HTTP headers for source prop on <Image> components #7338

Closed
wants to merge 1 commit into from

Commits on May 27, 2016

  1. iOS: Support HTTP headers for source prop on <Image> components

    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.
    
    When doing image requests, this also gives developers control over the
    other properties supported by [RCTConvert NSURLRequest:] like `method`
    and `body`.
    
    This change deprecates some APIs on RCTImageLoader in order to replace
    them with more flexible APIs which take an NSURLRequest rather than just
    an NSURL.
    Adam Comella committed May 27, 2016
    Configuration menu
    Copy the full SHA
    ca1f5a7 View commit details
    Browse the repository at this point in the history