Keine Beschreibung

net.js 613B

123456789101112131415161718192021222324252627
  1. // Copyright 2016 wkh237@github. All rights reserved.
  2. // Use of this source code is governed by a MIT-style license that can be
  3. // found in the LICENSE file.
  4. // @flow
  5. import {
  6. NativeModules,
  7. DeviceEventEmitter,
  8. Platform,
  9. NativeAppEventEmitter,
  10. } from 'react-native'
  11. const RNFetchBlob = NativeModules.RNFetchBlob
  12. /**
  13. * Get cookie according to the given url.
  14. * @param {string} url HTTP URL string.
  15. * @return {Promise<Array<String>>} Cookies of a specific domain.
  16. */
  17. function getCookies(url:string):Promise<Array<String>> {
  18. return RNFetchBlob.getCookies(url)
  19. }
  20. export default {
  21. getCookies
  22. }