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

Use hprose in React issue. #16

Open
MiyamuraMiyako opened this issue Oct 11, 2020 · 1 comment
Open

Use hprose in React issue. #16

MiyamuraMiyako opened this issue Oct 11, 2020 · 1 comment

Comments

@MiyamuraMiyako
Copy link

  1. npm i --S @hprose/html5
import * as hprose from '@hprose/html5';
const client = new hprose.Client('http://127.0.0.1:8255');

then:
TypeError: _hprose_rpc_html5__WEBPACK_IMPORTED_MODULE_4__.Client is not a constructor.

@MiyamuraMiyako
Copy link
Author

This code Unhandled Rejection (Error): The protocol "http:" is not supported.:

import * as hprose from '@hprose/rpc-core';
import '@hprose/rpc-html5';

const moduleClient = new hprose.Client('http://127.0.0.1:8412');

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant