1.0.8 • Published 7 years ago

hprose-react v1.0.8

Weekly downloads
4
License
ISC
Repository
github
Last release
7 years ago

hprose rpc

support

  • private (not public) interface support last param token
  • cache enter ,storage support expires
  • dynamically load the function table (not lazy)

demo

import openRpc from "hprose-react";
//openRpc return a Promise
//param 1 is url must type string
openRpc('ws://YOUR_SERVICE_DOMAIN/rpc/v1',window.sessionStorage/*you can set localStorage*/)
  .then(rpc => {
      this.rpc = rpc;
      // my service use public.user.login
      rpc.getDefaultToken = () => rpc.Storage.getRawItem(
		  'token',null,() => rpc.public.user.login('mimi','mimi',rpc.setToken));
      return rpc.cache.user.getInfo();
});
1.0.8

7 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago