RateLimitCaller invoke with query param and headers.

pull/951/head
atomzhong 3 years ago
parent 5c8907ebe6
commit 70b3f7f464

@ -1,7 +1,7 @@
# Change Log
---
- [feature: optimize polaris-ratelimit-example/ratelimit-caller-service, add custom label resolver.](https://github.com/Tencent/spring-cloud-tencent/pull/951)
- [feature: optimize polaris-ratelimit-example, add caller custom label resolver.](https://github.com/Tencent/spring-cloud-tencent/pull/951)
- [feature: add config for customized local port.](https://github.com/Tencent/spring-cloud-tencent/pull/923)
- [feat:support webclient and gateway report call metrics](https://github.com/Tencent/spring-cloud-tencent/pull/924)
- [feature: optimize polaris-discovery-example/discovery-callee-service, add client-ip return.](https://github.com/Tencent/spring-cloud-tencent/pull/939)

@ -76,7 +76,7 @@ public class Controller {
}
@GetMapping("/invoke/webclient")
public String invokeInfoWebClient(@RequestParam(defaultValue = "value1") String value1, @RequestParam(defaultValue = "value1") String value2, @RequestHeader Map<String, String> headers) throws InterruptedException, ExecutionException {
public String invokeInfoWebClient(@RequestParam(defaultValue = "value1", required = false) String value1, @RequestParam(defaultValue = "value1", required = false) String value2, @RequestHeader Map<String, String> headers) throws InterruptedException, ExecutionException {
StringBuffer builder = new StringBuffer();
WebClient webClient = webClientBuilder.baseUrl("http://" + appName).build();
@ -123,7 +123,7 @@ public class Controller {
* @throws InterruptedException exception
*/
@GetMapping("/invoke")
public String invokeInfo(@RequestParam(defaultValue = "value1") String value1, @RequestParam(defaultValue = "value1") String value2, @RequestHeader Map<String, String> headers) throws InterruptedException {
public String invokeInfo(@RequestParam(defaultValue = "value1", required = false) String value1, @RequestParam(defaultValue = "value1", required = false) String value2, @RequestHeader Map<String, String> headers) throws InterruptedException {
StringBuffer builder = new StringBuffer();
CountDownLatch count = new CountDownLatch(30);
for (int i = 0; i < 30; i++) {

Loading…
Cancel
Save