MCPcopy Create free account
hub / github.com/Chave0v0/API-Highlighter / setAPIFound

Method setAPIFound

src/main/java/com/chave/utils/Util.java:96–119  ·  view source on GitHub ↗
(String path, HttpRequest request)

Source from the content-addressed store, hash-verified

94
95 // 设置api找到状态
96 public static void setAPIFound(String path, HttpRequest request) {
97 ArrayList<APIItem> matchedItem = new ArrayList<>();
98 for (APIItem apiItem : APIConfig.TARGET_API) {
99 if (apiItem.getPath().equals(path)) {
100 matchedItem.add(apiItem);
101 }
102 }
103
104 if (UserConfig.IS_CHECK_HTTP_METHOD) {
105 for (APIItem apiItem : matchedItem) {
106 if (apiItem.getMethod() == null) {
107 apiItem.setIsFound("Found");
108 } else {
109 if (apiItem.getMethod().equalsIgnoreCase(request.method())) {
110 apiItem.setIsFound("Found");
111 }
112 }
113 }
114 } else {
115 for (APIItem apiItem : matchedItem) {
116 apiItem.setIsFound("Found");
117 }
118 }
119 }
120
121 // 设置APIItem result
122 public static void setAPIResult(String result, String path, HttpRequest request) {

Callers 2

actionPerformedMethod · 0.95

Calls 1

equalsMethod · 0.80

Tested by

no test coverage detected