pull/243/head
xiaojunnuo 2024-11-04 21:31:59 +08:00
parent d471d2416d
commit 8be886daf6
1 changed files with 4 additions and 4 deletions

View File

@ -6,11 +6,11 @@
## 2. 使用示例 ## 2. 使用示例
```js ```js
const certPem = this.ctx.self.cert.crt const certPem = ctx.self.cert.crt
const certKey = this.ctx.self.cert.key const certKey = ctx.self.cert.key
//axios发起http请求上传证书 //axios发起http请求上传证书
const res = await this.ctx.http.request({ const res = await ctx.http.request({
url:"your_cert_deploy_url", url:"your_cert_deploy_url",
method:"post", method:"post",
data:{ data:{
@ -18,7 +18,7 @@ const res = await this.ctx.http.request({
key : certKey key : certKey
} }
}) })
this.ctx.logger.info("上传成功",res.data) ctx.logger.info("上传成功",res.data)
``` ```