Http endpoint, pocket ic, and streaming response

Hey guys,
I’m trying to test using pocketic the stream features from http gateway announced here :

Btw i found 2 differents documentation.:

Which define HttpResponse in a different way, one is using streaming_strategy field, and others does not define it anymore.

Question :
Which one shall we follow now ?
How to test with pocket ic this part ? ie : i insert by chunk a big file, and i want to serve the file on http endpoint, and use this http streaming feature to get the file.

Thanks !

im testing with this as example : ic/packages/pocket-ic/tests/tests.rs at 90c56a39f105c1f65553a81853564923eb0a922f · dfinity/ic · GitHub

but it’s not working at all on my side. subdomain formated like that : format!(“{}.raw.{}”, canister, gateway_host), is not working.
Can you help?

I’m trying to test using pocketic the stream features from http gateway announced here

Have you implemented the streaming in your canister?

Which define HttpResponse in a different way, one is using streaming_strategy field, and others does not define it anymore.

The streaming_strategy field is optional and not used by the new streaming protocol. If you’ve implemented the new protocol, then you can drop the streaming_strategy field.

How to test with pocket ic this part ? ie : i insert by chunk a big file, and i want to serve the file on http endpoint, and use this http streaming feature to get the file.

Making a request against the HTTP endpoint should work fine.

im testing with this as example, but it’s not working at all on my side. subdomain formated like that : format!(“{}.raw.{}”, canister, gateway_host), is not working.

What do you mean by “it’s not working”?

Hey @NathanosDev
I’m finally able to query using pocketic my canister http endpoint correctly, but now my streaming is not working using streaming_strategy.
If it’s not anymore usefull, what’s the right way now to handle this ?

ah damn. I think this is the right way to do it now : response-verification/examples/http-certification/custom-assets/src/backend/src/lib.rs at main · dfinity/response-verification · GitHub ? Right ?

Can you please update documentation ? I mean, both solution are living here and there and i just completely messed up both solution… ahah
Thanks man !

Ok, i was just able to make it work as attempt using assert-certification. was way more easier using this library. Thanks for your work !
Btw, using this lib, assets are stored in heap ? :confused: