View Javadoc
1   package com.jsql.model.bean.util;
2   
3   import java.util.Map;
4   
5   /**
6    * An HTTP object containing request and response data.
7    */
8   public class HttpHeader {
9       
10      /**
11       * GET request.
12       */
13      private final String url;
14      
15      /**
16       * POST request.
17       */
18      private final String post;
19      
20      /**
21       * Header request.
22       */
23      private final Map<String, String> header;
24      
25      /**
26       * Header sent back by server.
27       */
28      private final Map<String, String> response;
29      
30      private final String source;
31      
32      /**
33       * Create object containing HTTP data to display in Network panel.
34       * @param url URL called
35       * @param post POST text sent with url
36       * @param header HEADER text sent with url
37       * @param response RESPONSE header sent by url
38       */
39      public HttpHeader(
40          String url,
41          String post,
42          Map<String, String> header,
43          Map<String, String> response,
44          String source
45      ) {
46          this.url = url;
47          this.post = post;
48          this.header = header;
49          this.response = response;
50          this.source = source;
51      }
52  
53      @Override
54      public String toString() {
55          return this.url;
56      }
57  
58  
59      // Getter
60      
61      public String getUrl() {
62          return this.url;
63      }
64  
65      public String getPost() {
66          return this.post;
67      }
68  
69      public Map<String, String> getHeader() {
70          return this.header;
71      }
72  
73      public Map<String, String> getResponse() {
74          return this.response;
75      }
76  
77      public String getSource() {
78          return this.source;
79      }
80  }