I am using Spring reactive WebClient to send requests to the http server. Inorder, to view the basic request and response sent, I turned on debugging logging for the reactor.ipc.netty package.
Headers for outgoing requests can be viewed normally.
Tho I send and receive plain text via http, the log contains the request and responses in the following format (is it hex?)
I'm not sure how to view the logged data in an easy to understand way. Even better, register your request and response in a clear way.
Below is a snippet of recorded data
+-------------------------------------------------+ | 0 1 2 3 4 5 6 7 8 9 abcdef | +--------+-------------------------------------------------+----------------+ |00000000| 47 45 54 20 2f 53 65 61 72 63 68 5f 47 43 2e 61 |GET /Search_GC.a| |00000010| 73 70 78 20 48 54 54 50 2f 31 2e 31 0d 0a 75 73 |spx HTTP/1.1..us| |00000020| 65 72 2d 61 67 65 6e 74 3a 20 52 65 61 63 74 6f |er-agent: Reacto| |00000030| 72 4e 65 74 74 79 2f 30 2e 37 2e 32 2e 52 45 4c |rNetty/0.7.2.REL| |00000040| 45 41 53 45 0d 0a 68 6f 73 74 3a 20 63 65 6f 6b |EASE..host: ceok| |00000050| 61 72 6e 61 74 61 6b 61 2e 6b 61 72 2e 6e 69 63 |arnataka.kar.nic| |00000060| 2e 69 6e 0d 0a 61 63 63 65 70 74 3a 20 2a 2f 2a |.in..accept: */*| |00000070| 0d 0a 61 63 63 65 70 74 2d 65 6e 63 6f 64 69 6e |..accept-encodin| |00000080| 67 3a 20 67 7a 69 70 0d 0a 63 6f 6e 74 65 6e 74 |g: gzip..content| |00000090| 2d 6c 65 6e 67 74 68 3a 20 30 0d 0a 0d 0a |-length: 0.... | +--------+-------------------------------------------------+----------------+
Found an unanswered question that should happen due to the same library: Reading an HttpContent that has PooledUnsafeDirectByteBuf
Raised the question here
There seems to be an orthodox view that debugging is not required for reactive clients. These are completely pointless arguments, because we use tools like rest client , postman , curl , httpie and others to send a request and view the response
spring webclient project-reactor spring-webflux reactor-netty
Ashok koyi
source share