Koajax returns data

  node.js, question

Want to askkoa ajaxHow did you return the data?
It was used beforeexpressCan be usedres.writeHeadSetting head,res.writeSet the return content, butkoaWithout these methods, how can we return?

I directlythis.body =It has no effect.

Fetch API cannot load  1. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://' is therefore not allowed access. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

BeginnerkoaI don’t know much about it,es6I’m working on it now, but the project is in a hurry. Please find a solution first.

The error report seems to be a cross-domain request. The response header lacks necessary fields. Set the following header

 'Access-Control-Allow-Origin': '*'

It looks as if you use fetch, remember not to forget to set fetch modecors