DEV Community

Markus Meyer
Markus Meyer

Posted on • Originally published at markusmeyer.hashnode.dev

1

VS Code - REST Client - WSL

Usually, I use Postman for doing REST requests.

But from time to time, Postman takes a long time to start or it crashes.

So I had a look into VS Code with REST Client.

It's straight forward to use it. Please find a short tutorial here.

restclient.png

I'm developing on my laptop and also on a VM.
The VM is required to access systems of the client that are running on-premise or in VNet in the cloud.

My local machine connects through VPN to VM.
Often, I do need to develop in the VM via RDP.
By using UnitTests and Mocks it's possible to do this on my local machine. I just need the repositories.

So, I'm not able to REST Client from my local machine, but I can use cURL.

On my VM (Windows 10), WSL is running.

I connect with ssh from my local machine to the VM.

ssh markusm@10...

Enter fullscreen mode Exit fullscreen mode

restclient-ssh.png

Then I execute

wsl
Enter fullscreen mode Exit fullscreen mode

From VS Code, I Copy Request as cURL:

restclient-copy-curl.png

And paste it into my terminal on my local machine.

Curl on WSL:

restclient-wsl-result.png

Sentry image

Hands-on debugging session: instrument, monitor, and fix

Join Lazar for a hands-on session where you’ll build it, break it, debug it, and fix it. You’ll set up Sentry, track errors, use Session Replay and Tracing, and leverage some good ol’ AI to find and fix issues fast.

RSVP here →

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

AWS Security LIVE!

Hosted by security experts, AWS Security LIVE! showcases AWS Partners tackling real-world security challenges. Join live and get your security questions answered.

Tune in to the full event

DEV is partnering to bring live events to the community. Join us or dismiss this billboard if you're not interested. ❤️