##### Coverage Report - com.ctrip.apollo.util.http.HttpRequest

Classes in this File | Line Coverage | Branch Coverage | Complexity
HttpRequest |
83% | 10/12
N/A | N/A
| 1.0;1

1 |  |
     package com.ctrip.apollo.util.http;
2 |  |
3 |  |
     /**
4 |  |
      * @author Jason Song(song_s@ctrip.com)
5 |  |
      */
6 |  |
     public class HttpRequest {
7 |  |
       private String m_url;
8 |  |
       private int m_connectTimeout;
9 |  |
       private int m_readTimeout;
10 |  |
11 |  |
       /**
12 |  |
        * Create the request for the url.
13 |  |
        * @param url the url
14 |  |
        */
15 | 110 |
       public HttpRequest(String url) {
16 | 110 |
         this.m_url = url;
17 | 110 |
         m_connectTimeout = -1;
18 | 110 |
         m_readTimeout = -1;
19 | 110 |
       }
20 |  |
21 |  |
       public String getUrl() {
22 | 156 |
         return m_url;
23 |  |
       }
24 |  |
25 |  |
       public int getConnectTimeout() {
26 | 103 |
         return m_connectTimeout;
27 |  |
       }
28 |  |
29 |  |
       public void setConnectTimeout(int connectTimeout) {
30 | 0 |
         this.m_connectTimeout = connectTimeout;
31 | 0 |
       }
32 |  |
33 |  |
       public int getReadTimeout() {
34 | 102 |
         return m_readTimeout;
35 |  |
       }
36 |  |
37 |  |
       public void setReadTimeout(int readTimeout) {
38 | 32 |
         this.m_readTimeout = readTimeout;
39 | 32 |
       }
40 |  |
     }