Showing posts with label issues. Show all posts
Showing posts with label issues. Show all posts

Tuesday, 14 May 2013

Background page for Advanced Rest Client

Hi developers.
Greetings from Googleplex - just befor Google IO ;)

Today I've noticed that you asked me hwy the application use background page. Yes, there are event pages that don't require consistent presence of the application process but it just don't fit.

To know what exactly background page do refer to source file and previous article about ARC API.
Earlier I introduced an API for Rest Client. Now other extensions can cooperate with application - they can run an application with predefined values (like URL, payload, headers list). To make it possible I have to implement handlers for message passing (either for cross-extension communication and for web intents). It require to initialize background page. Without it the application have no place to initialize handlers without actually running the app.

Furthermore, GWT (Google's framework used to develop the application) is not ready to be used with Chrome extensions/applications. Thanks the background page I can actually develop the app using Chrome API (which is required). Without it developing the app would be extremely difficult.

You may have concerns about memory and starting up Chrome itself. Well, there is actually really little code in background page. Most of the function in background page are used when you making a request. It's do nothing when you are not using the app. But still I need to have it loaded in case if related from ARC app would like to use it.

If you have a question post it in an comment. I'll answer you. You may also report an issue if you find one.

Happy RESTing ;)

Friday, 8 February 2013

Google Drive permissions - Why the app need them?



Hi all,

Recently I've received an email from one of you. Someone asked me why do I need those permissions to connect to Google Drive. Well, below is my answer:

My app is using following scopes for Google Drive:
a) https://www.googleapis.com/auth/drive.install
b) https://www.googleapis.com/auth/drive.file
c) https://www.googleapis.com/auth/drive.readonly.metadata

The first permission "drive.install" is required for apps that want to install itself to users Google Drive. Thanks to this permission you can use option "Open as" and then "Advanced Rest Client" from file context menu. It is one of planned functions in the app and it do not influence any file on Google Drive.

Permission b) is required to open/save file on Drive, but only created by the application.

And finally c) it is required to retrieve list of folders from your drive. It is used when you want to save your file on the Drive. Otherwise the application is only able to save file on root folder. From UX perspective it is not recommended to remove this functionality. Also note, this permission does not allow any access to read or download file content.

More about scopes you can read at https://developers.google.com/drive/scopes. You can check https://code.google.com/p/chrome-rest-client/source/browse/trunk/RestClient/war/drive.js file to know how the app is integrated with Google Drive.  

I'm not planning to change permissions scope. At least until Google introduce Google Folder Picker. For now Drive Picker allows only to pick up a file and I need to pickup a directory.

(end of response)

You are welcome to email me about your concerns or if you have some great idea for the app. I'm always reading your emails (or issues on Goggle code).

Happy RESTing!

Friday, 21 September 2012

It's almost here! New version of Advanced Rest Client

Hi all!

I'd like to inform you that new version of the application is almost ready :)
It took over 3 months but the application was written from scratch. Now it can do a lot more than current version. Thanks for all who submit an issue on http://code.google.com/p/chrome-rest-client/issues/list and helps me improve application.

Note:
There is a number of new permissions required by the application. See bottom of this post for more info.

Let's start from UI.

New version UI

UI now have more modern look. It is not very different from current version, but devil is in the details. Have you noticed that there is new option in menu?

Projects is a new feature. It helps you organize saved requests and you can easily switch between requests sharing it's parameters. More about projects you can find in my previous post.
Project view
OK, let's make a HTTP request:


Still it is not very different form previous version. But as you can see I've added new section to response view. Now Request Headers are also available in application view. And there is more.
Since now you can overwrite browsers headers that are not available for regular XmlHttpRequest! This mean that you can set User-Agent, Accept and many more headers. It becomes possible since new declarativeWebRequest API in Chrome. And here is the bad news. For today it is only available for Chrome Dev Channel (version 23). It will take about 3 months before it becomes available in stable version. Since then I'll send an update to Web Store but it will be available for version 23+.

Let's go on. Lately someone suggest that application should show redirect chain (issiue 67). Well, here it is:

It will show complete request flow. For each redirect it collects information about received headers, status and information is this redirection comes from cache (f.e. HTTP 301) or not.


I've made some improvements to request form panel. You can "open" url input field and create URL using form:
When you need to encode query parameters just pres "enc" button for this parameter. If you need to encode parameter but replace + with %20 just hold CTRL key.


There are changes in settings section as well. First at all "cookies capture" is no more experimental. Well, it is not working very well right now. Results may vary and you can't rely on it. But since application can show all response headers (even those invisible to the XmlHttpRequest object) you can see cookie data in response panel.
There is no JSON headers settings. This is fixed now and list contain all popular json headers definitions.

Important change for the application is import/export options. Since now export to application server is deprecated and this option will be removed December 1st, 2012.
There are better options for import export. First is export to file. Application will generate json file with projects and requests definitions. You can easily change it's content and send file to collaborators. Thanks to this change you don't need to be worry about data sent to application server.

Next step it to implement Google Drive API to save file directly on your drive. Then the application becomes one of the Google Drive applications.

There is a number of new permissions required by application.

  • webRequest 
    • This is required to observe and analyze traffic - to know when redirect occur and to catch request and response headers 
  • declarativeWebRequest 
    • This is required to modify request headers by XmlHttpRequest (to remove or add headers)
  • background 
  • storage 
    • Chrome provides API for sync data. Application will synchronize some settings like debug and history options.
  • history (not changed) is required by URL widget to provide fill support. While typing an URL it search application's and browser's history. When it find matches it will return it in suggestions list. Browser's history is not stored in application
  • <all_urls> (not changed) is required by application to make any request outside application sandbox. 
  • cookies permission has been removed

I hope you like changes and you will like new version of the application. Update will become available in next few weeks. Since then you still can report an issue if you found some :)

Cheers!

Tuesday, 17 July 2012

Work on new version in progress... :)

If you're wondering when new version of Rest Client will be available I just wanna let you know that it will happen in next one or two months.
Why so long? - you probably ask. Well, it will be totally new version. Whole application is writing right now from scratch. And this needs time :(
Picture below is showing application's start up flow diagram. That shows how many operations is needed to run the application.



What is new in the application? 
First at all: the projects. If you have more than one endpoint of the same webapplication (developer server, test server, production server, etc) then you will can save WebRequests under one project. When you open project you will be able to quickly switch between endpoints and define which part of URL need to change (either protocol, host, path or params) and to what it should change.

For example you have REST project under http://dev.rest.com/api?key=mydevkey&restOfParams
Then you might want to switch to production server but it's host address is http://myproject.com and there you have different API key. 
By creating a project you can define reference URL address http://dev.rest.com/api?key=mydevkey&restOfParams (you can give it a name, like "dev"). Then, for another endpoint, you'll tell the app that it must change server value and key param when switching between endpoints (to defined values).


Second big change in application is closer integration with chrome extensions API.
Now, you can't set some of headers (like cookie, user, user-agent etc). It's not permitted by XMLHttpRequest spec. Using Chrome API application can change headers just before sending request to server, omitting specification restrictions.

Proposed change is integration with Google Drive. Instead of sending saved requests to application's server (app engine) you'll be able to save it to Google Drive and share it with co-workers. It's safer way for you and cheaper for me ;)

Next change is integration with external extensions. Some of you emailed to me to give them possibility to access to the application via extensions communication system (to run application, to replace results window, etc). I'm working on this and it should be available in next version. 

That's all for now.
I'd like to hear feedback from you! If you have suggestions write to me, please.

Tuesday, 27 March 2012

Time goes on

Nope, I haven't forgot about my favorite application.
I just changing my job right now and I don't have time to code lately... I read your comments on application profile and reported issues on Google Developers. But I need more time to work wit this. So be patient, report new bugs (if any :) and I will take care of it.

Happy RESTing :)

P.S.
If you curious about my new company it's interactive agency Kalicinscy.com :)