1 | package fr.sii.ogham.sms.util.http; | |
2 | ||
3 | ||
4 | /** | |
5 | * Simple abstraction of the HTTP response. It just contains the useful | |
6 | * information (response body as string and http status). | |
7 | * | |
8 | * @author Aurélien Baudet | |
9 | * | |
10 | */ | |
11 | public class Response { | |
12 | /** | |
13 | * The HTTP status | |
14 | */ | |
15 | private final HttpStatus status; | |
16 | ||
17 | /** | |
18 | * The response body directly as String | |
19 | */ | |
20 | private final String body; | |
21 | ||
22 | public Response(int status, String body) { | |
23 | this(HttpStatus.valueOf(status), body); | |
24 | } | |
25 | ||
26 | public Response(HttpStatus status, String body) { | |
27 | super(); | |
28 | this.status = status; | |
29 | this.body = body; | |
30 | } | |
31 | ||
32 | public HttpStatus getStatus() { | |
33 |
2
1. getStatus : replaced return value with null for fr/sii/ogham/sms/util/http/Response::getStatus → NO_COVERAGE 2. getStatus : replaced return value with null for fr/sii/ogham/sms/util/http/Response::getStatus → KILLED |
return status; |
34 | } | |
35 | ||
36 | public String getBody() { | |
37 |
2
1. getBody : replaced return value with "" for fr/sii/ogham/sms/util/http/Response::getBody → NO_COVERAGE 2. getBody : replaced return value with "" for fr/sii/ogham/sms/util/http/Response::getBody → KILLED |
return body; |
38 | } | |
39 | } | |
Mutations | ||
33 |
1.1 2.2 |
|
37 |
1.1 2.2 |