Skip to content

Commit d4a2024

Browse files
author
Sefi Krausz
committed
changes to axios target
1 parent bd5cc25 commit d4a2024

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/targets/node/axios.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,10 @@ module.exports = function (source, options) {
7878
if (includeFS) {
7979
code.unshift('const fs = require("fs");')
8080
}
81+
const formatedOptions = JSON.stringify(requestOptions).replace(/"{"/, `{
82+
`)
8183
code.push(`axios(${
82-
JSON.stringify(requestOptions).replace(/"{"/, `{
83-
`)
84+
formatedOptions
8485
})
8586
.then((response)=>{
8687
console.log(response)

0 commit comments

Comments
 (0)