rest - How to create Http Response with Dart -


i trying follow along 1 of dart httpserver examples github, and, while show how create , handle routes, i'm still @ loss on how produce , send httpresponce in response specific url being requested.

for example, while working webapi, have api controller, in explicitly define action get, put, delete , post verbs, , return appropriate httpresponse resource each such method.

does know how typical crud business done using dart http server?

once receive httprequest need use response attribute answer.

void sendok(httprequest request, [content]) {   request.response     ..statuscode = httpstatus.ok     ..write(content)     ..close()     ; } 

Comments

Popular posts from this blog

html - Sizing a high-res image (~8MB) to display entirely in a small div (circular, diameter 100px) -

java - IntelliJ - No such instance method -

identifier - Is it possible for an html5 document to have two ids? -