Hurl: Comfortable Curl

Hello! image

In 2009, "Rails Rumble" Lech CULVER and Chris Vanstrom was created a wonderful tool — Hurl.

Hurl is RoR application designed to send HTTP requests. Overall, the functionality is similar to the Hurl Curl. The idea and the methods are the same, but the purpose is quite another.

Unfortunately, the hosting, which is the official Hurl very unstable and slow and not suitable for corporate use. Opensource technologies give us the opportunity to raise their instance Hurl, and even make it better.

So we lifted and improved Hurl on your hosting — hurl.quickblox.com. The application is configured on the EC2 instance, and data is stored on S3.

What we have improved the source code Hurl? first, your fork sc-raptor corrected bug with authorization on GitHub, which nivkakuyu not want to work in the source code. Second, korjik added to Hurl the ability to shorten links Hurl bit.ly on our custom domain qblx.co.

Now I'll detail the possibility of a Hurl. The main important parts of this apps are:
the
    the
  • Generate HTTP requests
  • the
  • Maintaining history of queries
  • the
  • Share the request and response body separately


So, going to home, don't forget to log in through GitHub.
image


After login, you will see the following picture: your GitHub login has authorized and given the opportunity to view all calls made
image


Next, you can make the most simple Sapri, for example, to Yandex API from articles zviryatko. Will do a regular request:
image


So, we get the translation of the word midnight — midnight.

Let us consider the lower part of the page:
image


We are now in the Response tab Response. Here we can see the response to our request.

Clicking on the Request, we see the request we made in this format:
image


The most interesting — links "view full size" and "permalink". Going by him, you will be able to see the body answer well to try other queries.

Going to your "account" you will find a list made by you hurlow:
image


You can also remove what is not needed.

How and where are stored hurly? In ruby application, there is a folder db. It in binarnom a lie "hurly", "view function" and users:
the
$ ls-l db/hurls/
total 1028
drwxr-xr-x 48 hurl hurl 4096 2012-03-22 15:58 00
drwxr-xr-x 45 hurl hurl 4096 2012-03-22 16:46 01
drwxr-xr-x 49 hurl hurl 4096 2012-03-22 13:58 02
drwxr-xr-x 47 hurl hurl 4096 2012-03-22 14:11 03
drwxr-xr-x 44 hurl hurl 4096 2012-03-22 13:24 04
drwxr-xr-x 45 hurl hurl 4096 2012-03-23 10:38 05
drwxr-xr-x 48 hurl hurl 4096 2012-03-23 14:32 06
drwxr-xr-x 47 hurl hurl 4096 2012-03-23 08:34 07
drwxr-xr-x 50 hurl hurl 4096 2012-03-23 10:07 08
drwxr-xr-x 52 hurl hurl 4096 2012-03-21 10:45 09
drwxr-xr-x 43 hurl hurl 4096 2012-03-23 15:43 0a


Space does not very much. For more than six months of active use Hurl, our team made a total of 152 MB requests:
the
$ du-h --max-depth=1 db/
77M db/hurls
76M db/views
136K db/users
152M db/


why bother? We are working on a project which actively uses the API. Testing and writing documentation becomes much easier if you use Hurl. Also, illustrative examples for users not only in Curl requests and responses, and a place where you do gain can touch API.

In General, Hurl is an easy and convenient tool for creating and storing the HTTP requests. Ustanavlivaetsya as a simple Rails app. Takes up little space and system resources. Recommend!
Article based on information from habrahabr.ru

Комментарии

Популярные сообщения из этого блога

Automatically create Liquibase migrations for PostgreSQL

Vkontakte sync with address book for iPhone. How it was done

What part of the archived web