Advanced REST Client blog
Blog for Advanced Rest Client - a Google Chrome application.

Encoding drop down removal from the app

Hi developers!


Update April 4, 2016
As of release 6 of the app the dropdown for content type header back to the app. Read more in this blog post.



I received a lot of questions about missing drop-down with predefined encoding values. I feel I owe you an explanation.

Lets begin of what it was. Encoding for payload is nothing more than value for Content-Type header. So when you selected one of predefined encodings (or rather mime types) the app added Content-Type header to the headers list before submission.

Earlier, the drop down list contained a list of predefined values for the Content-Type header. In fact this was only a shortcut for adding a header to the headers list. We all love shortcuts but..



Having this options there was some tradeoff. You didn't have full control over headers list. Even if setting up Content-Type header manually was overriding drop-down selection, when the request was restored from the storage the content type header was missing from the headers list. That was happening because it was moved to the dropdown. Without this, the additional UI element doesn't have sense because setting it up with Content-Type header on the headers list did nothing.

That was confusing for many of you and it wasn't obvious how it works and why. So I decided to remove this field from the UI to make it less confusing and more intuitive for you.

In new version, without the dropdown list, when you switch to the request that can carry a payload, the Content-Type will be added automatically to the headers list with "application/x-www-form-urlencoded" value as a most basic C-T. It won't be placed there, however, if there already C-T header on the list. This suppose to help you notice that the header value should be set.

Additionally you have to helper options to lookup for predefined CT header value. On the "raw" tab, when you enter Content-Type header the dropdown list will appear inline with some predefined values. You can release the drop-down using CTRL+space combination.
Now you can use it even more quickly than using the old dropdown below the form.  To have it working you must have CodeMirror support enabled in settings.



Second option is available in "form" tab. When you focus on a header value field for C-T header the Construct/Edit value button.


Then you'll see a dialog with predefined C-T header values. You can choose one of them to insert it to the field value.


As you can see, you still have a support for setting up content type headers as you had it before. New approach, however, should be more efficient and natural for you.

Don't forget to comment below and as always.. happy RESTing!