@@ -29,7 +29,7 @@ public void shouldLogRequest() throws IOException {
29
29
final HttpLogFormatter unit = new CurlHttpLogFormatter ();
30
30
final String curl = unit .format (new SimplePrecorrelation <>(correlationId , request ));
31
31
32
- assertThat (curl , is ("curl -v -X GET -H 'Accept: application/json' -H 'Content-Type: text/plain' -d 'Hello, world!' 'http://localhost/test?limit=1 '" ));
32
+ assertThat (curl , is ("curl -v -X GET 'http://localhost/test?limit=1' -H 'Accept: application/json' -H 'Content-Type: text/plain' --data-binary 'Hello, world!'" ));
33
33
}
34
34
35
35
@ Test
@@ -42,7 +42,7 @@ public void shouldLogRequestWithoutBody() throws IOException {
42
42
final HttpLogFormatter unit = new CurlHttpLogFormatter ();
43
43
final String curl = unit .format (new SimplePrecorrelation <>(correlationId , request ));
44
44
45
- assertThat (curl , is ("curl -v -X GET -H 'Accept: application/json' 'http://localhost/test '" ));
45
+ assertThat (curl , is ("curl -v -X GET 'http://localhost/test' -H 'Accept: application/json'" ));
46
46
}
47
47
48
48
@ Test
@@ -56,12 +56,12 @@ public void shouldEscape() throws IOException {
56
56
.withHeaders (MockHeaders .of (
57
57
"Foo'Bar" , "Baz"
58
58
))
59
- .withBodyAsString ("Hello, 'world'!" );
59
+ .withBodyAsString ("{ \" message \" : \" Hello, 'world'!\" } " );
60
60
61
61
final HttpLogFormatter unit = new CurlHttpLogFormatter ();
62
62
final String curl = unit .format (new SimplePrecorrelation <>(correlationId , request ));
63
63
64
- assertThat (curl , is ("curl -v -X GET -H 'Foo\\ 'Bar: Baz' -d ' Hello, \\ 'world\\ '!' 'http://localhost/test?char= \\ ' '" ));
64
+ assertThat (curl , is ("curl -v -X GET 'http://localhost/test?char= \\ '' -H 'Foo\\ 'Bar: Baz' --data-binary '{ \" message \" : \" Hello, \\ 'world\\ '!\" } '" ));
65
65
}
66
66
67
67
@ Test
0 commit comments