title: how to pass callback data to koa ctx.body?
body: <p>I'm using Typescript with nodejs.I have <code>callback function</code> and i'm getting data as a object in body when i console. I want to pass data in data key of <code>ctx.body</code>. Can i push that <code>object</code> in other <code>variable</code> and then pass to <code>ctx.body</code>?</p>
  
  <pre><code>router.post('/api/send_otp', async (ctx: Koa.Context, next: () =&gt; Promise&lt;any&gt;) =&gt; {
          var phone = ctx.request.body.phone;
  
          if (!phone) {
              ctx.body = {
                  message: "Please enter phone number",
              };
          } else {
  
      var options = {
          url: '',
          method: 'POST',
          auth: {
              'user': '',
              'pass': ''
          },
      };
  
      const callback = function(error, response, body) {
          if (response) {
              console.log(body); // Getting data here
          }else{
              console.log('error',error);
          }
      };
  
      request(options,callback);
  
      ctx.body = {
          data: body,   //I want data here
      }
  });
  </code></pre>