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

httpCall -> response body ? #32

Open
avkv1 opened this issue Jan 2, 2021 · 2 comments
Open

httpCall -> response body ? #32

avkv1 opened this issue Jan 2, 2021 · 2 comments

Comments

@avkv1
Copy link

avkv1 commented Jan 2, 2021

Can I get the response body for httpCall callback ?

    this.ctx.httpCall("service2", headers, new ArrayBuffer(0), [], 30000, this.ctx, function (origin_context: Context, headers: u32, body_size: usize, trailers: u32){

    // some logic here

      continue_request();
    });

@chandlernine
Copy link
Contributor

Have you tried the following?

              get_buffer_bytes(BufferTypeValues.HttpCallResponseBody, 0, body_size as u32)

@thinhtranquoc
Copy link

hi all, could you please help me

I cannot import a get_buffer_bytes function
Error: import get_buffer_bytes
Module '"../node_modules/@solo-io/proxy-runtime/assembly"' has no exported member 'get_buffer_bytes'.ts(2305)

Version using: "@solo-io/proxy-runtime": "^0.1.8", "@assemblyscript/loader": "^0.9.4",

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

3 participants