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 | | |
47 | this.url = url; | |
48 | this.post = post; | |
49 | this.header = header; | |
50 | this.response = response; | |
51 | this.source = source; | |
52 | } | |
53 | ||
54 | @Override | |
55 | public String toString() { | |
56 |
1
1. toString : replaced return value with "" for com/jsql/model/bean/util/HttpHeader::toString → NO_COVERAGE |
return this.url; |
57 | } | |
58 | ||
59 | ||
60 | // Getter | |
61 | | |
62 | public String getUrl() { | |
63 |
1
1. getUrl : replaced return value with "" for com/jsql/model/bean/util/HttpHeader::getUrl → NO_COVERAGE |
return this.url; |
64 | } | |
65 | ||
66 | public String getPost() { | |
67 |
1
1. getPost : replaced return value with "" for com/jsql/model/bean/util/HttpHeader::getPost → NO_COVERAGE |
return this.post; |
68 | } | |
69 | ||
70 | public Map<String, String> getHeader() { | |
71 |
1
1. getHeader : replaced return value with Collections.emptyMap for com/jsql/model/bean/util/HttpHeader::getHeader → NO_COVERAGE |
return this.header; |
72 | } | |
73 | ||
74 | public Map<String, String> getResponse() { | |
75 |
1
1. getResponse : replaced return value with Collections.emptyMap for com/jsql/model/bean/util/HttpHeader::getResponse → NO_COVERAGE |
return this.response; |
76 | } | |
77 | ||
78 | public String getSource() { | |
79 |
1
1. getSource : replaced return value with "" for com/jsql/model/bean/util/HttpHeader::getSource → NO_COVERAGE |
return this.source; |
80 | } | |
81 | } | |
Mutations | ||
56 |
1.1 |
|
63 |
1.1 |
|
67 |
1.1 |
|
71 |
1.1 |
|
75 |
1.1 |
|
79 |
1.1 |