-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Global headers #15
Global headers #15
Conversation
Now they can be overwritten if the request has the same header
There are three tabs that makes the navigation easier It can be freely resized Readded some widgets that were removed Bumped version to 1.2
Thanks for the pull request. I will try to review it in this weekend. |
Added new configuration option to hide the confirmation for project properties Fixed issue with authentication screen Added checkbox that disables the global headers Global headers are displayed in the header table but are disabled Some improvements to table views
Sorry for the delay, I've been really busy these last days, I have updated the PR to address your comments. GlobalHeaders will be displayed on the header table but they are marked as not modificable, and will never be. If the user wants to override one of them they should add a new one to the request. This was the less complex solution that I found that allow FRequest to show the global headers. I added a new configuration to hide the project saved successful dialog (I feel that is useful for me, so I would like to keep it), by default it is enabled as it was before. There is an issue with the new checkbox to disable the globalheaders, mainly on refreshing the UI to show/hide the headers on the table. |
Hi @alevalv , thanks for applying the changes. It is not a problem, I also have been busy myself. I will check everything again and I will report back if necessary. |
Now the upgrade mechanics are now less error prone when updating, and it is also easier to create new upgrade functions. Moved the function disableTableWidgetRow from the generic Util to UtilFRequest, since this is specific to FRequest.
I am creating some commits to finish your feature. I am reviewing all the code and making adjustments where I think it is necessary, I will report here the progress. In the end I will ask you to do a final (or not) review. Question/Comment 1 has been reviewed. |
Question/Comment 3 has been reviewed. |
Sorry for the massive delay. I have been very busy. I will finish this review in next 1 / 2 weeks. |
6c11e67
to
ad8ef70
Compare
Question/Comment 2 has been reviewed. I submitted a couple of changes to this branch. I fixed some things and decided to remove the override feature of the global headers (if you add one with the same name). The reason for the last one, is that it seems that it is possible to have multiple headers with the same key: and this would make very hard to track which header would be overriden. If we add scripting to FRequest, the functionality can be improved using user scripts. @alevalv Please check the changes that I did, and if you agree we can push this to master, so the functionality gets add to the next release. |
Since multiple headers can have the same key (accordingly to here): https://stackoverflow.com/a/4371395 I decided to remove the override feature for global headers, now they are always added to the final headers in the request, except if the "disable global headers" checkbox is ticked. Also added a tooltip to the "disable global headers" checkbox.
I didn't know about having the same header multiple times. The checkbox override is good enough for enabling/disabling/overriding so I'm ok with that change @fabiobento512 . I was able to test the scenarios related with globalHeaders with success, but I wasn't able to send a request with multiple headers with the same key. I might be having some issues with my environment or it could be qt issue, but the FRequest code is working as expected. |
@alevalv You are right. I tried send duplicate headers and I checked the traffic in wireshark, for some reason FRequest is not sending them. It may be due to Qt or some bug in the code. Anyway I will merge this feature with master branch now and I will see if I can fix this issue later. Thanks for your work! |
A new version has been released with your contribution. Thanks. :) P.S. Sorry for the huge delay but I do this for free and in my free time. |
This PR adds Global Headers and removes two dialogs, one when a request fails and one when the project is saved successfully.
Global Headers are defined at the project level and are shared by all existing Request under the project. They can be overwritten by the request if they have the same key.
This pull request also include a refactor of the projectproperties ui, adding tabs for better navigation.