"use strict";(self.webpackChunknocobase=self.webpackChunknocobase||[]).push([[9317],{9317:function(n,e,s){s.r(e);var t={contexts:["*"],prefix:"sn-api-request",label:"API request template",description:"Basic template to send HTTP requests via ctx.request",locales:{"zh-CN":{label:"API \u8BF7\u6C42\u6A21\u677F",description:"\u4F7F\u7528 ctx.request \u53D1\u9001 HTTP \u8BF7\u6C42\u7684\u57FA\u7840\u6A21\u677F"}},content:`
// Replace url/method/params/data as needed
const response = await ctx.request({
  url: 'users:list',
  method: 'get',
  params: {
    pageSize: 10,
  },
});

ctx.message.success(ctx.t('Request finished'));
console.log(ctx.t('Response data:'), response?.data);
`};e.default=t}}]);
