mirror of
https://github.com/dkershner6/post-api-call-action.git
synced 2024-12-27 19:33:55 +08:00
Adding url to log
This commit is contained in:
parent
12cb7682a5
commit
49dfd9b470
2
dist/index.js
vendored
2
dist/index.js
vendored
@ -33,7 +33,7 @@ function run() {
|
|||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
try {
|
try {
|
||||||
const url = core_1.getInput('url');
|
const url = core_1.getInput('url');
|
||||||
core_1.info('Sending POST request...');
|
core_1.info(`Sending POST request to ${url}`);
|
||||||
const data = parseJsonSafely(core_1.getInput('data'));
|
const data = parseJsonSafely(core_1.getInput('data'));
|
||||||
const headers = parseJsonSafely(core_1.getInput('headers'));
|
const headers = parseJsonSafely(core_1.getInput('headers'));
|
||||||
yield axios_1.default.post(url, data, {
|
yield axios_1.default.post(url, data, {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "post-api-call-action",
|
"name": "post-api-call-action",
|
||||||
"version": "1.0.0",
|
"version": "1.0.1",
|
||||||
"private": true,
|
"private": true,
|
||||||
"description": "Send a POST request action",
|
"description": "Send a POST request action",
|
||||||
"main": "lib/main.js",
|
"main": "lib/main.js",
|
||||||
|
@ -12,7 +12,7 @@ const parseJsonSafely = (jsonString: string): any => {
|
|||||||
async function run(): Promise<void> {
|
async function run(): Promise<void> {
|
||||||
try {
|
try {
|
||||||
const url: string = getInput('url');
|
const url: string = getInput('url');
|
||||||
info('Sending POST request...');
|
info(`Sending POST request to ${url}`);
|
||||||
const data = parseJsonSafely(getInput('data'));
|
const data = parseJsonSafely(getInput('data'));
|
||||||
const headers = parseJsonSafely(getInput('headers'));
|
const headers = parseJsonSafely(getInput('headers'));
|
||||||
await axios.post(url, data, {
|
await axios.post(url, data, {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user