first version
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -96,4 +96,5 @@ Thumbs.db
|
|||||||
|
|
||||||
# Ignore built ts files
|
# Ignore built ts files
|
||||||
__tests__/runner/*
|
__tests__/runner/*
|
||||||
lib/**/*
|
lib/**/*
|
||||||
|
src/test.ts
|
||||||
@@ -8,13 +8,13 @@ async function run(): Promise<void> {
|
|||||||
const desp:string|boolean = core.getInput('desp')??false;
|
const desp:string|boolean = core.getInput('desp')??false;
|
||||||
const url:string = `https://sctapi.ftqq.com/${sendkey}.send`;
|
const url:string = `https://sctapi.ftqq.com/${sendkey}.send`;
|
||||||
|
|
||||||
// send request via form
|
// send request via urlencoded
|
||||||
let params = new URLSearchParams();
|
let params = new URLSearchParams();
|
||||||
params.append( title, title );
|
params.append( 'title', title );
|
||||||
if( desp ) params.append( desp, desp);
|
if( desp ) params.append( 'desp', desp);
|
||||||
|
|
||||||
const ret = await axios.post( url , params );
|
const ret = await axios.post( url , params );
|
||||||
console.log( ret, ret.data );
|
return ret.data??false;
|
||||||
|
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
Reference in New Issue
Block a user