-
Notifications
You must be signed in to change notification settings - Fork 22
Open
Description
Hello! Thanks for framework, it's great. But I have a problem with JS SDK,
In AssembleScript we have
import { util } from 'near-sdk-as'
...
function htmlResponse(text: string): Web4Response {
return { contentType: 'text/html; charset=UTF-8', body: util.stringToBytes(text), status: 200 } as Web4Response;
}
But in JS SDK we haven't util, so I tried something like this:
function htmlResponse(text: string): Web4Response {
return { contentType: 'text/html; charset=UTF-8', body: new TextEncoder().encode(text), status: 200 } as Web4Response;
}
But it not working...
Could you create example for JS SDK? It will be very helpful for all js developers).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels