From aef118880aa129556a56f420930d55fc40811f65 Mon Sep 17 00:00:00 2001 From: Nityananda Gohain Date: Fri, 13 Sep 2019 11:42:20 +0530 Subject: [PATCH] added functionality to import data from curl post request --- pages/index.vue | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pages/index.vue b/pages/index.vue index 2e2c3c2d8..f39619340 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -864,8 +864,6 @@ this.url = parsedCurl.url.replace(/"/g,"").replace(/'/g,""); this.url = this.url[this.url.length -1] == '/' ? this.url.slice(0, -1): this.url; this.path = ""; - this.headers - this.showModal = false; this.headers = []; for (const key of Object.keys(parsedCurl.headers)) { this.headers.push({ @@ -874,6 +872,11 @@ }) } this.method = parsedCurl.method.toUpperCase(); + if (parsedCurl["data"]){ + this.rawInput = true; + this.rawParams = parsedCurl["data"]; + } + this.showModal = false; } catch (error) { this.showModal = false; }