Read more

HTTP Client in RubyMine

Martin Schaflitzl
July 07, 2020Software engineer at makandra GmbH

RubyMine has a HTTP Client that can be useful to test web APIs.
Just create a .http scratch file an write your request in it.
The request can then be executed with the "Run all requests in File" button above the file.

Illustration online protection

Rails Long Term Support

Rails LTS provides security patches for old versions of Ruby on Rails (2.3, 3.2, 4.2 and 5.2)

  • Prevents you from data breaches and liability risks
  • Upgrade at your own pace
  • Works with modern Rubies
Read more Show snapshot

Some alternatives:

The format for request is like this:

Method Request-URI HTTP-Version
Header-field: Header-value


Some examples:

// A basic get request
// A POST with json body
Content-Type: application/json

{ "key" : "value" }

It also supports multiple sequential requests, with a JS-API to parse and reuse responses in later requests.
So lets say you need to retrieve an authtoken first and then make your request, you could do:

Content-Type: application/json

    "token": "my-secret-token"

// Saving a variable

> {%"auth_token", response.body.token);


//Accessing a variable
Authorization: Bearer {{auth_token}}

Complete documentation can be found here: Show snapshot

Posted by Martin Schaflitzl to makandra dev (2020-07-07 10:27)