Nessuna descrizione

net.js 604B

1234567891011121314151617181920212223242526
  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. import {
  5. NativeModules,
  6. DeviceEventEmitter,
  7. Platform,
  8. NativeAppEventEmitter,
  9. } from 'react-native'
  10. const RNFetchBlob = NativeModules.RNFetchBlob
  11. /**
  12. * Get cookie according to the given url.
  13. * @param {string} url HTTP URL string.
  14. * @return {Promise<Array<String>>} Cookies of a specific domain.
  15. */
  16. function getCookies(url:string):Promise<Array<String>> {
  17. return RNFetchBlob.getCookies(url)
  18. }
  19. export default {
  20. getCookies
  21. }