Open blokeley opened 8 years ago
i'm unable to replicate getting this error, but i do notice that it doesn't open correctly.
upon clicking "Open in separate editor", i see that it does put the file with the appropriate contents in C:\tmp\GET - www.google.com
but it doesn't open it in atom. will definitely have to take a closer look at this.
I have the same issue on Windows 7 box
so, i did some more research, and this happens when C:\tmp\
doesn't exist to save a file in it. Two possible solutions i can see:
temp
npm package to save temporary files. I think i like option 2 best because this will utilize platform specific temp locations. the temp
package i believe uses %TEMP% in windows
I got it working in Windows. Edit .atom\packages\rest-client\lib\rest-client-editor.coffee, line 12:
@path = process.env.TEMP + "\\#{@file_name}.json"
Just give it the extension of the payload type you expect.
This worked for me too, but I don't think you need to include the file extension, at least not if you're using Content-Type: application/json in the headers.
I also added .replace('?', '') to line 31 for when parameters are being passed in the URI. Not very elegant, but it works.
To replicate:
Atom error dialog: