RESTer
RESTer copied to clipboard
Fold large body fields
If you are in form mode or other mode that allows for individual fields, add an option to fold/close/hide the field data if the data is large.
For example, if you are posting to an API that receives a base64 enconded image, the field becomes huge and hard to work with.
Hi Lucas. That's a great idea. Do you know of other applications where a similar feature works well? I would like to see how exactly the fields should behave, e.g. onfold/fold on focus/blur or additional button to toggle folding.
Actually, you was the first developer that answered me about this haha. I have asked for this feature in postman and other bigger apps already.
I haven't seen this implemented yet. If you want to implement this fast, you can add a simple fold to each text field that has more than a determined number of lines. This solves the problem but only works if you are using a request format that is based on fields, such as form multipart.
Another idea is to introduce "variables". Instead of pasting the value itself in the field, you assign a variable that can be set in a separate field or window. This would solve the problem globally since you can implement the same scheme for both form fields and json bodies.
Using the second solution, a form field would have a button or something like that to choose a variable instead of inputting a value. If a variable was chosen instead of a value, then the field would render as a button with the variable name. That button when clicked would show the variable data in a separate context (that works better with large amounts of data).
When typing a json body the user can insert a variable in a json field by using some special character combination that is invalid to json. Something like "image" : @flower_image. The variable tag @flower_image, would be substituted before the request, by the variable value.
Those are just ideas. This can be implemented in any manner that better satisfies your app. Still, this is a feature that I miss in most rest apps. Either the feature is very unintuitive and hidden, or it is simply not there. It is very hard for me because I do a lot of rest requests with images (base64 encoded) and long byte arrays.
Anyway, thanks for considering this! I'll try to find if postman has this implemented and how they implemented this. Your app is still way better than postman simply because I can open it in the browser directly and I can test a request without saving, crating a name and other unnecessary setup.
On Wed, Jan 8, 2020, 16:34 Jan Kühle [email protected] wrote:
Hi Lucas. That's a great idea. Do you know of other applications where a similar feature works well? I would like to see how exactly the fields should behave, e.g. onfold/fold on focus/blur or additional button to toggle folding.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/frigus02/RESTer/issues/117?email_source=notifications&email_token=AAKRX7PJX6R3ZM25YWSCCHLQ4YTE7A5CNFSM4KEIL4XKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEINWYYY#issuecomment-572222563, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAKRX7KLFE324PDKEMV2XQDQ4YTE7ANCNFSM4KEIL4XA .
RESTer has variables. You can use {var1}
almost everywhere (URL, headers, body). You should then see an input field for this variable in the "Variables" tab. But these input fields have the same issue. And they are not stored with the request.
RESTer also has global and saved variables. I called that "Environments". But again the input fields there have the same issue for large values.
I will think of something 🙂. Just to manage expectations, though. I'm not sure when I will get to this, yet.