Update importers

This commit is contained in:
Gregory Schier 2016-11-19 14:26:40 -08:00
parent eaf87e9397
commit c3fdeac27a
3 changed files with 3 additions and 7 deletions

View File

@ -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",

View File

@ -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,

View File

@ -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",