curl --trace-ascii /dev/stdout http://localhost:8085/basic --data-urlencode 'filter=[{"columnName":"test","condition":"=","value":"Успешно"}]'
== Info:
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0== Info: Trying 127.0.0.1:8085...
== Info: Connected to localhost (127.0.0.1) port 8085 (#0)
=> Send header, 154 bytes (0x9a)
0000: POST /basic HTTP/1.1
0016: Host: localhost:8085
002c: User-Agent: curl/7.74.0
0045: Accept: */*
0052: Content-Length: 122
0067: Content-Type: application/x-www-form-urlencoded
0098:
=> Send data, 122 bytes (0x7a)
0000: filter=%5B%7B%22columnName%22%3A%22test%22%2C%22condition%22%3A%
0040: 22%3D%22%2C%22value%22%3A%22%3F%3F%3F%3F%3F%3F%3F%22%7D%5D
== Info: upload completely sent off: 122 out of 122 bytes
-H 'Accept: application/json'
curl --trace-ascii /dev/stdout http://localhost:8085/basic --data-urlencode 'filter=[{"columnName":"test","condition":"=","value":"Успешно"}]' -H 'Accept: application/json'
curl --trace-ascii /dev/stdout http://localhost:8085/basic --data-urlencode 'filter=[{"columnName":"test","condition":"=","value":"Успешно"}]' -H 'Content-Type: application/json'
== Info: Uses proxy env variable no_proxy == '192.168.99.100'
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0== Info: Trying 127.0.0.1:8085...
== Info: Connected to localhost (127.0.0.1) port 8085 (#0)
=> Send header, 137 bytes (0x89)
0000: POST /basic HTTP/1.1
0016: Host: localhost:8085
002c: User-Agent: curl/7.74.0
0045: Accept: */*
0052: Content-Type: application/json
0072: Content-Length: 122
0087:
=> Send data, 122 bytes (0x7a)
0000: filter=%5B%7B%22columnName%22%3A%22test%22%2C%22condition%22%3A%
0040: 22%3D%22%2C%22value%22%3A%22%3F%3F%3F%3F%3F%3F%3F%22%7D%5D
== Info: upload completely sent off: 122 out of 122 bytes
== Info: Mark bundle as not supporting multiuse
request = new HttpEntity<String>(data.toString(), headers);
responseEntity = restTemplate.postForEntity(url, request, String.class,
headers);
curl --help |grep urle
--data-urlencode <data> HTTP POST data url encoded
protected void configure(HttpSecurity http) throws Exception {
http
.authorizeRequests()
//static resources configuration
.antMatchers("/resources/**", "/webjars/**", "/img/**").permitAll()
//login page and registration end-point
.antMatchers("/login", "/registration").permitAll()
//all other requests
.anyRequest().authenticated()
.and()
// login form configuration
.formLogin()
.loginPage("/login")
.failureUrl("/login?error")
.defaultSuccessUrl("/", true)
.permitAll()
.and()
//logout configuration
.logout()
.logoutRequestMatcher(new AntPathRequestMatcher("/logout"))
.logoutSuccessUrl("/login");
}
начиная с того что не get а post и не exchange а с postForEntity и с параметром который будет pojo который отсериализуется как надо (формат тела оригинальный надо признать но если такого требует бакенд то придется такой делать
кстати очевидно придется задачу решать по частям
удачи