Now that Insomnia uses native modules (node-libcurl) the tests that require it no longer run. This is because the module needs to be compiled against NodeJS and Electron separately. If we can make it so the tests only ever use the Electron node runtime, we can compile native modules once and leave assume they will work.
Right now, Insomnia defaults to 4 spaces for an indent but this takes up a lot of horizontal space so it would be nice to have the option to change it to 1 or 2.
Insomnia should support the ability to build full-featured plugins on top of. Due to the low performance requirements that Insomnia plugins will have, HTTP would be an ideal protocol for plugin communication. HTTP-based plugins are not as easy to write or run, but maybe that's not a problem.
How it would work:
write a web server with certain endpoints to respond to hooks
/plugin-info to define plugin behavior
/pre-render to set up env and stuff
/pre-request to do things like auth and stuff
/post-request to handle the response (set env vars, etc)
app would contact plugins when hooks are triggered
plugins would respond with certain commands for the app
It's confusing when a new user makes a request and the body defaults to a code editor with a tab title of Other. It would be better to default to an empty screen explaining that there is no body selected. This would also make it so the tab could say something like Body instead of Other.
Nunjucks does not allow - in variable names. A common mistake users make is to name variables like my-variable and try to use it as {{ my-variable }}. However, Nunjucks interprets this as "my subtract variable" and causes confusion.
Solution: Show warning in environment editor when a key of the JSON contains characters that are not valid in Nunjucks.
Ideally, this could mark the error inline using Codemirror, but would probably be fine as a global warning (above or below the editor) to start.
You can do this using agentOptions of the request library.
varfs=require('fs'),path=require('path'),certFile=path.resolve(__dirname,'ssl/client.crt'),keyFile=path.resolve(__dirname,'ssl/client.key'),request=require('request');varoptions={url: 'https://api.some-server.com/',agentOptions: {cert: fs.readFileSync(certFile),key: fs.readFileSync(keyFile),// Or use `pfx` property replacing `cert` and `key` when using private key, certificate and CA certs in PFX or PKCS12 format:// pfx: fs.readFileSync(pfxFilePath),passphrase: 'password',securityOptions: 'SSL_OP_NO_SSLv3'}};request.get(options);
Sometimes developers reset their OAuth server and clear tokens. When this happens, Insomnia fails the request with a 401 and the user has to manually refresh the token. Ideally, the app would see the 401 and attempt to refresh the token automatically.
Apparently, Atom has a setting to "Auto Hide Menu Bar." A LOT of users hate the look of the menu bar so it would be awesome to copy Atom in this regard.
This is only a problem on Windows and Linux because MacOS hides the application menubar at the top of the screen.
Right now, importing is weird because there is no feedback on what actually happened. Also, importing data may be destructive, because existing data will be overwritten. Thus, the import functionality should be refactored into something more sensible.
detect the filetype of the import and show the user whether or not it's supported
perform a dry run to figure out what will be created/updated
show dry run results to the user
let the user select the import type based on results
My API returns an expires_in field but no refresh token (you are expected to get a new one if it expires). I believe this is valid according to the RFC as both fields are optional with no interdependencies.
However, the acquired token shows up as "Never expires" in Insomnia; I guess that is because there is no refresh token.
insomnia seems to constantly override my Content-Type header I'll set it to [text/xml;charset="utf-8"] and when the response comes back the header on my SEND side is either removed completely or changed to [application/text] and I have to go back in and change it again for each time I hit Send.
PouchDB required high storage overhead because it requires saving a full history of every document. If we don't necessarily need sync, this is not worth it.
LokiJS
LokiJS has a very similar API to PouchDB (probably simpler) so it should be trivial to drop in.
Wins
No longer have to debounce user input
Can use the NPM package
Can easily persist to file for Dropbox/cloud sync
Has a changes API that can be used to sync remotely
There are a lot of things in settings that don't make sense across multiple workspaces. These settings should be moved to the Workspace model. There are also some new things that would also fit here.