When building REST-based web APIs, it’s worth having a tool available to invoke them over HTTP. The current versions of WebStorm 6, PhpStorm 6, RubyMine 5.4 and PyCharm contain a bundled REST Client plugin which allows us to do just that.
In this blog post, we’ll have a quick look at the built-in features of the REST Client and on how to use them.
In this post, we’ll be using PhpStorm as our IDE, invoking an API built using the Silex framework which is similar to frameworks like Sinatra and Nancy. The API we’ll be testing using the REST Client plugin is fairly straightforward: it exposes an array of users through a REST endpoint. The /users endpoint returns the entire array of users. The /users/:id endpoint returns a specific user when issuing a GET request and writes a user to the array when issuing a PUT request. The source code for this API is available as a GitHub Gist:
The REST Client can be found under Tools | Test RESTful Web Service. A new tab will be opened which gives us the possibility to craft an HTTP request which will be invoked against our API. We can specify the HTTP method to be used, the host where our API is located, and the path to be invoked. Other than that, we can add header data as well as query string parameters or a request body to be sent to the API.
Upon invoking the request by clicking the green Run button, the REST Client connects to our API and gathers the response data. We can easily inspect the response body as well as the response headers, each available through their own result tab.
To create a user in our API, invoke a PUT request providing JSON data in the request body. We can provide the request body by entering the text or by selecting a file to upload as the body.
Download PyCharm, WebStorm 6 Preview, or the latest PhpStorm 6 EAP build and let us know what you think!
Develop with pleasure!
– JetBrains Web IDE Team
For up-to-date information please follow to corresponding WebStorm blog or PhpStorm blog.




Text on screenshots is almost unreadable
Have you tried clicking on it to zoom? Can read it normally..
Would be cool if you have the opportunity to define the method to be sent to the server as for example a Varnish system you need PURGE and/or BAN method (usually). Is there any way to extend the methods?
Currently it should be implemented within the REST Client Plugin, no opportunity to add the method in settings or somewhere else.. Feel free to request this feature in our issue tracker at http://youtrack.jetbrains.com/issues/WI
Seems useful!
Looks nice, but what about Webstorm? Modern Web Apps are using REST services very heavily!
It’s not in WebStorm now, feel free to request it to be bundled in our issue tracker at http://youtrack.jetbrains.com/issues/WEB
Will this feature be available in webstorm too? Seems quite useful for node rest API development…
It’s not in WebStorm now, feel free to request it to be bundled in our issue tracker at http://youtrack.jetbrains.com/issues/WEB
Hi,
if there’s function to store a different request and select them to run test against different services quickly I won’t have to run JMeter too often 
Very good tool. However
Regards,
Currently not implemented, but probably this functionality can be added in the future version.. Feel free to file a feature request at http://youtrack.jetbrains.com/issues/WI
+1 for Support in WebStorm. Very very useful for node.js development!
http://youtrack.jetbrains.com/issue/WEB-6881
That’s a cool feature! It would be nice if it would be coupled with debugging somehow.
Any specific requests? Feel free to request a feature in the issue tracker at http://youtrack.jetbrains.com/issues/WI
Nice.
But, what about http basic authorization?
You have to do it manually now. But that’s a good idea to make it as simple as entering your credentials. Could you please file a feature request?
This would be useful in AppCode as well.
Feel free to request it to be bundled in our issue tracker at http://youtrack.jetbrains.com/issues/OC
REST client with be included in WebStorm installation since the next public build (essentially tonight)
What about other IDEs? I’m using PHPStorm and RubyMine, will this (very useful) feature be included also in other products?
It is included in PhpStorm EAP, @Fabio, I’m using it right now.
Feel free to request it to be bundled in your favourite IDE – our issue tracker is at http://youtrack.jetbrains.com (select the IDE from the top-left menu)
Will this be or is this available as a plugin for IDEA as well?
Feel free to request it to be bundled in our issue tracker at http://youtrack.jetbrains.com/issues/IDEA
Good addition. But unless I’m mistaken, it is not possible to save preconfigured requests, is it ? This would really make it more useful.
Any specific requests? Feel free to request a feature in the issue tracker at http://youtrack.jetbrains.com/issues/WI
How about for testing API’s that require authentication?
You can manually add the headers your API will use, depending if it’s cookie, basic, oAuth…
Higher level integration would of course be better
Feel free to request a feature in the issue tracker at http://youtrack.jetbrains.com/issues/WI
Pingback: WebStorm 6 Public Preview Build | WebStorm & PhpStorm Blog
Yes! IDEA and RubyMine and AppCode would be nice
This is really exciting that you’ve provided this REST Client. I just tried it out and I’m hopeful.
However, there are two things that I think it really needs, and one is an obvious deficiency:
1.) It needs to be able to trigger the PhpStorm debugger so that we can trace through the code implementing the web service.
2.) It also needs a way to save off a “session” complete with method, host/port, path, headers, query parameters and request body. What would be awesome is if the rest client could be configured to look in a directory for JSON files that would contain this information which would allow us to save them using the UI and/or to edit or create them by hand using the editor or even in an automated fashion.
I’m going to add both of these as feature requests.
Feature requests posted:
- Enable REST Client to trigger XDEBUG/Zend Debugger
- Enable REST Client to Save/Load “Sessions” in JSON Format
for your first issue, I know that this is not a perfect fix, but consider sending XDEBUG_SESSION_START=XXXXX on the path!
you can run the debugger and then using the provided session key (e.g 12345) you can set the rest client as such an example:
method: get
host/port: http://example.com/
path: rest/do/something?XDEBUG_SESSION_START=12345
and then set everything else needed. the debugger will be triggered upon receiving the proper info; just as if it was triggered from a browser…
That’s a good suggestion, thanks!
Pingback: WebStorm 6 – HTML5/CSS3/JavaScript IDE now with TypeScript, CoffeeScript and Dart support | techscouting through the java news
Has anybody tried to upload a file with this really helpful extension? I’m capable of uploading the file and the $_FILES gets filled, but the problem is that in the $_FILES array, each entry name must be relevant to a field name on the form, and there seems to be no way to define the field name for the uploaded file in this extension. Or is it? Could anyone tell me how to bind an uploaded file to a specific field name?
Also, is there anyway to upload multiple files at the same time?
Can you post this as a feature request on http://youtrack.jetbrains.com/issues/WI?
Seriously, why do most rest clients not offer the ability to set Basic authentification data directly. It is really not convenient to base64 encode the username:password myself every time I want to try something out. And a lot of modern APIs require this information.
Can you create a feature request on http://youtrack.jetbrains.com/issues/WI?
Pingback: Новости » Blog Archive » Новый PhpStorm 6.0 облегчает работу с Composer и другими инструментами
Pingback: Новости » Blog Archive » Новый PhpStorm 6.0 облегчает работу с Composer и другими инструментами
Pingback: Новости » Blog Archive » Новый PhpStorm 6.0 облегчает работу с Composer и другими инструментами
Hello everyone. I spent the whole day to use the brand new REST Client tool, But I think something is missing. In the response headers, I can’t see the HTTP Status code, Is there a way to get it or this feature doesn’t exist at all?
I can see the HTTP Status code under the Response box (Response tab) e.g. “Response code: 200(OK); Content-length….” or in Response Headers tab e.g. “Status: 200 OK”.
As stupid as it sounds, I got the same error yesterday. Clean PhpStorm installation on Windows and I gave up. Today i figured out that the REST Client tool is not sized correctly in height. You have to drag it a bit up to see the bottom line containing the status response code. The only reason why I noticed that: the outputs seemed to be truncated at the end (last line was always missing) and there is NO indication that there is more content at the bottom of the tool.
Created an issue for this: http://youtrack.jetbrains.com/issue/WI-18488