mirror of
https://github.com/Kong/insomnia
synced 2024-11-07 22:30:15 +00:00
Update importers
This commit is contained in:
parent
eaf87e9397
commit
c3fdeac27a
@ -16,7 +16,7 @@
|
||||
"electron-squirrel-startup": "^1.0.0",
|
||||
"hkdf": "0.0.2",
|
||||
"httpsnippet": "git@github.com:getinsomnia/httpsnippet.git#a3a2c0a0167fa844bf92df52a1442fa1d68a9053",
|
||||
"insomnia-importers": "^0.2.1",
|
||||
"insomnia-importers": "^0.3.0",
|
||||
"json-lint": "^0.1.0",
|
||||
"jsonpath-plus": "^0.15.0",
|
||||
"mime-types": "^2.1.12",
|
||||
|
@ -138,15 +138,11 @@ class App extends Component {
|
||||
const {resources} = importers.import(url);
|
||||
const r = resources[0];
|
||||
if (r && r._type === 'request') {
|
||||
const cookieHeaders = r.cookies.map(({name, value}) => (
|
||||
{name: 'cookie', value: `${name}=${value}`}
|
||||
));
|
||||
|
||||
// Only pull fields that we want to update
|
||||
await models.request.update(request, {
|
||||
url: r.url,
|
||||
method: r.method,
|
||||
headers: [...r.headers, ...cookieHeaders],
|
||||
headers: r.headers,
|
||||
body: r.body,
|
||||
authentication: r.authentication,
|
||||
parameters: r.parameters,
|
||||
|
@ -85,7 +85,7 @@
|
||||
"electron-squirrel-startup": "^1.0.0",
|
||||
"hkdf": "0.0.2",
|
||||
"httpsnippet": "git@github.com:getinsomnia/httpsnippet.git#a3a2c0a0167fa844bf92df52a1442fa1d68a9053",
|
||||
"insomnia-importers": "^0.2.1",
|
||||
"insomnia-importers": "^0.3.0",
|
||||
"json-lint": "^0.1.0",
|
||||
"jsonpath-plus": "^0.15.0",
|
||||
"mime-types": "^2.1.12",
|
||||
|
Loading…
Reference in New Issue
Block a user