File tree Expand file tree Collapse file tree
src/main/java/com/laker/postman/panel/collections/right/request Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55import cn .hutool .json .JSONUtil ;
66import com .laker .postman .common .SingletonFactory ;
77import com .laker .postman .common .setting .SettingManager ;
8- import com .laker .postman .panel .collections .right .request .sub .EasyHttpHeadersPanel ;
9- import com .laker .postman .panel .collections .right .request .sub .EasyParamsTablePanel ;
108import com .laker .postman .common .table .map .EasyTablePanel ;
119import com .laker .postman .model .*;
1210import com .laker .postman .panel .collections .right .RequestEditPanel ;
@@ -380,13 +378,7 @@ protected void done() {
380378 JOptionPane .YES_NO_OPTION ,
381379 JOptionPane .QUESTION_MESSAGE );
382380 if (result == JOptionPane .YES_OPTION ) {
383- // 检查 header 区域是否已存在 Accept: text/event-stream(忽略大小写)
384- boolean hasSseAccept = headersPanel .getMap ().keySet ().stream ()
385- .anyMatch (k -> k != null && k .equalsIgnoreCase (ACCEPT ) &&
386- TEXT_EVENT_STREAM .equalsIgnoreCase (headersPanel .getMap ().get (k )));
387- if (!hasSseAccept ) {
388- headersPanel .addRow (ACCEPT , TEXT_EVENT_STREAM );
389- }
381+ headersPanel .setOrUpdateHeader (ACCEPT , TEXT_EVENT_STREAM );
390382 reqTabs .setSelectedComponent (headersPanel );
391383 // 定位到headerpanel table的最后一行
392384 headersPanel .scrollRectToVisible ();
You can’t perform that action at this time.
0 commit comments