Skip to content

Commit b8a943b

Browse files
authored
Merge pull request #7 from swnck/dev
Refactor AbstractRequest to use setter for URL; simplify JxRequestTes…
2 parents a4e12f9 + 54e869a commit b8a943b

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/main/java/io/github/swnck/request/AbstractRequest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ public abstract class AbstractRequest<T extends AbstractRequest<T>> {
2424

2525
public AbstractRequest(String url, Method method) {
2626
this.method = method;
27-
this.url = url;
27+
28+
this.setUrl(url);
2829
}
2930

3031
public AbstractRequest(Method method) {

src/test/java/io/github/swnck/JxRequestTest.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,9 @@
99
public class JxRequestTest {
1010
@Test
1111
void get() {
12-
GetRequest jxRequest = JxRequest.get()
13-
.setUrl("google.com");
12+
GetRequest jxRequest = JxRequest.get("google.com");
1413

1514
JxResponse response = jxRequest.send();
16-
System.out.println(response.toString());
1715
assertNotNull(response);
1816
}
1917

0 commit comments

Comments
 (0)