Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017ic4b7M7FEdeEm3APj16Bu
15 lines
997 B
Plaintext
15 lines
997 B
Plaintext
# 07-default-request-factories (Spring Boot 4.1.3, JDK 25)
|
|
request factory class on RestTemplate: new RestTemplate() -> org.springframework.http.client.SimpleClientHttpRequestFactory
|
|
request factory class on RestTemplate: RestTemplateBuilder.build() -> org.springframework.http.client.JdkClientHttpRequestFactory
|
|
|
|
User-Agent the server received (GET /whoami)
|
|
new RestTemplate() : Java/25.0.5.1
|
|
RestClient.create() : Java-http-client/25.0.5.1
|
|
injected RestClient.Builder (Boot) : Java-http-client/25.0.5.1
|
|
RestTemplateBuilder.build() (Boot) : Java-http-client/25.0.5.1
|
|
|
|
PATCH /students/1
|
|
new RestTemplate().patchForObject(...) -> ResourceAccessException: I/O error on PATCH request for "http://localhost:<port>/students/1": Invalid HTTP method: PATCH
|
|
RestClient.create().patch()...body(Student) -> Student[id=1, name=Asha P]
|
|
new RestTemplate(new JdkClientHttpRequestFactory()).patchForObject(...) -> Student[id=1, name=Asha Q]
|