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

surface response status code #3

Merged
merged 3 commits into from
Sep 30, 2020
Merged

Conversation

udameli
Copy link

@udameli udameli commented Sep 30, 2020

No description provided.

Copy link
Member

@1vn 1vn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@udameli udameli merged commit 6c0ce9f into master Sep 30, 2020
@udameli udameli deleted the du/send-response-status-code branch September 30, 2020 18:49
VojtechVitek added a commit to webrpc/gen-typescript that referenced this pull request Jul 19, 2023
Credits:
- @kipply
- @udameli
- @wujessica
- @1vn
- @robertkozin

cohere-ai/webrpc#1
cohere-ai/webrpc#3
cohere-ai/webrpc#20

---

AbortSignal docs:

https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal

---

Example:

  const controller = new AbortController();
  const signal = controller.signal;

  setTimeout(() => controller.abort(), 5000);

  const { user } = await rpc.GetUser({ userId }, null, signal);
VojtechVitek added a commit to webrpc/gen-typescript that referenced this pull request Jul 19, 2023
* Backport AbortSignal feature from cohere.ai fork

Credits:
- @kipply
- @udameli
- @wujessica
- @1vn
- @robertkozin

cohere-ai/webrpc#1
cohere-ai/webrpc#3
cohere-ai/webrpc#20

---

AbortSignal docs:

https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal

---

Example:

  const controller = new AbortController();
  const signal = controller.signal;

  setTimeout(() => controller.abort(), 5000);

  const { user } = await rpc.GetUser({ userId }, null, signal);

* AbortSignal is already in Fetch's RequestInit argument

* Fix TypeScript error TS2304: Cannot find name 'AbortSignal'

  server.gen.ts:41:57 - error TS2304: Cannot find name 'AbortSignal'

Add "DOM" to compilerOptions.lib in your tsconfig.json file.
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

Successfully merging this pull request may close these issues.

None yet

2 participants