Commit Graph

2000 Commits

Author SHA1 Message Date
Stephane Nicoll
4695bd332a Polish "Get content as String for ContentCachingRequestWrapper"
See gh-30709
2023-08-22 19:11:26 +02:00
Sam Brannen
9908967954 Merge branch '6.0.x' 2023-08-04 15:55:59 +03:00
Sam Brannen
169392e132 Polish StringHttpMessageConverterTests 2023-08-04 15:53:37 +03:00
Sam Brannen
c050642290 Polish contribution
See gh-30942
2023-08-04 15:50:07 +03:00
Patrick Strawderman
7636eecb48 Use readNBytes in StringHttpMessageConverter when contentLength is available
When the content length is known, use readNBytes on the InputStream in
StringHttpMessageConverter, which avoids some extra copying and allocations.

Closes gh-30942
2023-08-04 15:43:10 +03:00
Sam Brannen
170d6bfdad Clean up warnings in tests 2023-07-31 16:17:48 +03:00
Arjen Poutsma
efb6abc43f Deprecate OkHttp3ClientHttpRequestFactory
Closes gh-30919
2023-07-20 13:48:52 +02:00
Sam Brannen
a34f9fa66c Update copyright headers 2023-07-15 13:10:46 +02:00
Sam Brannen
63fe45d92a Update copyright headers 2023-07-15 13:11:29 +02:00
Sam Brannen
5ce8ffd197 Merge branch '6.0.x' 2023-07-15 13:11:03 +02:00
rstoyanchev
793581ebde Add ForwardedHeaderUtils
Closes gh-30886
2023-07-13 18:12:30 +01:00
Sam Brannen
16b9640af2 Merge branch '6.0.x' 2023-07-12 11:50:11 +02:00
Sam Brannen
68f2b0ca59 Rely on auto-boxing in tests 2023-07-12 11:49:02 +02:00
rstoyanchev
57ed5bf34b Polishing contribution
Closes gh-30869
2023-07-11 19:13:22 +01:00
Olga MaciaszekSharma
8b77ed164d Add RestClientAdapter
See gh-30869
2023-07-11 19:13:22 +01:00
rstoyanchev
a3e37597aa Add ReactiveHttpRequestValues
Separate collection and handling of reactive request values into a
subclass of HttpRequestValues.

Closes gh-30117
2023-07-11 07:42:04 +01:00
Rossen Stoyanchev
22376c2efa Polishing
See gh-30117
2023-07-10 11:24:30 +01:00
rstoyanchev
47667ab990 Collapse hierarchy under HttpServiceMethodTests
See gh-30117
2023-07-10 10:56:32 +01:00
Rossen Stoyanchev
068dc7db28 Remove use of TestHttpClientAdapter
Now that HttpClientAdapter is deprecated and replaced by HttpExchangeAdapter
and ReactorHttpExchangeAdapter, our tests should use the new contracts.

See gh-30117
2023-07-10 10:36:16 +01:00
rstoyanchev
3be4c0a893 Replace Void with void on exchange method
See gh-30117
2023-07-10 09:10:14 +01:00
Olga MaciaszekSharma
268f3c853e Add RestTemplate support for HTTP interface client
See gh-30117
2023-07-06 19:07:40 +02:00
Juergen Hoeller
062d701ae1 Consistently use mutable ArrayList for modulesToInstall vs modules
Closes gh-30751
2023-06-26 12:34:54 +02:00
Arjen Poutsma
20dd66cd5a Introduce ReactorNettyClientRequestFactory
This commit introduces an implementation of ClientHttpRequestFactory
based on Reactor Netty's HttpClient.

Closes gh-30835
2023-07-07 15:30:53 +02:00
Arjen Poutsma
68b5eedde1 Change OutputStreamPublisher default chunk size
This commit set the default chunk size to 1024 (from 8192).
2023-07-06 12:01:24 +02:00
Arjen Poutsma
3d2befc84a Rearrange HttpHeaders adapters
This commit moves HttpHeaders that are used in multiple places (client
and server, reactive and non-reactive) to a new, separate http.support
package.

Closes gh-30823
2023-07-06 11:00:26 +02:00
Sam Brannen
368a917466 Polish RestClient, etc. 2023-07-05 15:22:27 +02:00
Arjen Poutsma
a6c5692586 Make OutputStreamPublisher more generic
This commit improves the OutputStreamPublisher so that it is capable
of publishing other types that ByteBuffers.
2023-07-05 15:20:43 +02:00
rstoyanchev
deaa493644 Add Visitor to HandlerMethodValidationException
Closes gh-30813
2023-07-04 17:19:58 +01:00
Arjen Poutsma
0820210c7c Introduce RestClient
This commit introduces the RestClient, a synchronous HTTP client that
offers an API similar to WebClient, using the same infrastructure (i.e.
request factory, error handler, interceptors, etc) as RestTemplate.

Closes gh-29552
2023-07-04 10:27:58 +02:00
rstoyanchev
592ab0f350 Add ~.validation.method package
Extract classes from ~.validation.beanvalidation without a direct
dependency on beanvalidation.

See gh-30644
2023-07-03 15:05:51 +01:00
rstoyanchev
7a79da589a Add default web handling of method validation errors
Closes gh-30644
2023-07-03 12:08:11 +01:00
Rossen Stoyanchev
ba4d9a5230 Add BindErrorUtils
This deprecates static methods in MethodArgumentNotValidException
which is not a great vehicle for such methods.

See gh-30644
2023-07-03 12:08:11 +01:00
Arjen Poutsma
46f1849c2f Polishing external contribution
See gh-30787
Closes gh-30788
2023-07-03 12:36:25 +02:00
spencergibb
9900575f9c Allow customization of disallowed JdkClientHttpRequest headers
By default, the JDK HttpClient's HttpRequest does not allow Connection,
Content-Length, Expect, Host, or Upgrade headers to be set, but this can
be overriden with the `jdk.httpclient.allowRestrictedHeaders` system
property.

See https://bugs.openjdk.org/browse/JDK-8213696

Closes gh-30787
2023-07-03 12:35:44 +02:00
Johnny Lim
41f8b6926f Polish gh-30013
See gh-30013
2023-06-30 14:02:15 +02:00
Arjen Poutsma
0033eb4ed6 Polishing external contribution
- Removed duplicate Client in types names.
- Removed buffering in favor of OutputStream to
  Flow.Publisher<ByteBuffer> bridge.
- Made request and types package private.
- Various other small improvements.

Closes gh-30478
2023-06-28 12:23:29 +02:00
Marten Deinum
2ca8dd2faa HttpClient based ClientHttpRequestFactory
As JDK17 is now the baseline it is possible to use the
HttpClient provided by Java.
2023-06-28 10:43:44 +02:00
rstoyanchev
11a416156b Use ResolvableType to create WebDataBinder
This provides more flexibility to pass a targetType even if
a MethodParameter is not available.

See gh-26721
2023-06-26 13:11:05 +01:00
rstoyanchev
ea398d7b7e Support constructing target object in DataBinder
See gh-26721
2023-06-22 20:36:28 +01:00
rstoyanchev
40bf923d7d Polishing in MultipartFileArgumentResolver
Closes gh-30728
2023-06-27 10:51:42 +01:00
Olga Maciaszek-Sharma
e69a1d22f9 Add MultipartFile support to HTTP interface client
See gh-30728
2023-06-27 09:55:24 +01:00
Juergen Hoeller
feac983869 Merge branch '6.0.x' 2023-06-26 12:35:56 +02:00
Sébastien Deleuze
f06cf21341 Support Kotlin parameter default values in handler methods
This commit adds support for Kotlin parameter default values
in handler methods. It allows to write:
@RequestParam value: String = "default"
as an alternative to:
@RequestParam(defaultValue = "default") value: String

Both Spring MVC and WebFlux are supported, including on
suspending functions.

Closes gh-21139
2023-06-22 16:08:48 +02:00
rstoyanchev
b98c1ec36a Apply default value in case of null after conversion
Closes gh-29550
2023-06-20 17:18:40 +01:00
Sam Brannen
a2072de391 Update copyright headers 2023-06-15 16:21:13 +02:00
Juergen Hoeller
f00a8cb3a3 Remove ServerWebExchange dependency in ServerRequestObservationContext
Avoiding cycle between http.server and web.server packages.

See gh-30013
2023-06-14 21:57:27 +02:00
Juergen Hoeller
93345de687 Consistent Locale exposure for Bean Validation message assertions
See gh-29825
See gh-30198
2023-06-14 10:39:19 +02:00
Juergen Hoeller
bbf3c6ecac Upgrade to Jackson 2.15
Closes gh-30665
2023-06-14 10:39:11 +02:00
Sam Brannen
e7c3e1c516 Merge branch '6.0.x' 2023-06-13 17:14:03 +02:00
Sam Brannen
ed74b04520 Move web-related test for BeanUtilsRuntimeHints to spring-web
The dependency on spring-web from spring-beans makes it impossible to
import the projects in Eclipse IDE due to cycles between projects.

This commit therefore moves the web-related test for
BeanUtilsRuntimeHints to spring-web.

See gh-30491
2023-06-13 17:12:38 +02:00