refactor: better toast messages + minor ui improvements
This commit is contained in:
@@ -58,8 +58,8 @@ export const JavascriptFetchCodegen = {
|
||||
requestString.push(" response.headers\n")
|
||||
requestString.push(" response.url\n\n")
|
||||
requestString.push(" return response.text()\n")
|
||||
requestString.push("}).catch(function(error) {\n")
|
||||
requestString.push(" error.message\n")
|
||||
requestString.push("}).catch(function(e) {\n")
|
||||
requestString.push(" console.error(e)\n")
|
||||
requestString.push("})")
|
||||
return requestString.join("")
|
||||
},
|
||||
|
||||
@@ -56,8 +56,8 @@ export const JavascriptJqueryCodegen = {
|
||||
requestString.push(".then(response => {\n")
|
||||
requestString.push(" console.log(response);\n")
|
||||
requestString.push("})")
|
||||
requestString.push(".catch(error => {\n")
|
||||
requestString.push(" console.log(error);\n")
|
||||
requestString.push(".catch(e => {\n")
|
||||
requestString.push(" console.error(e);\n")
|
||||
requestString.push("})\n")
|
||||
return requestString.join("")
|
||||
},
|
||||
|
||||
@@ -51,8 +51,8 @@ export const NodejsAxiosCodegen = {
|
||||
requestString.push(".then(response => {\n")
|
||||
requestString.push(" console.log(response);\n")
|
||||
requestString.push("})")
|
||||
requestString.push(".catch(error => {\n")
|
||||
requestString.push(" console.log(error);\n")
|
||||
requestString.push(".catch(e => {\n")
|
||||
requestString.push(" console.error(e);\n")
|
||||
requestString.push("})\n")
|
||||
return requestString.join("")
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user