How can I fix request syntax in http client?

I would like to inquire about an error while using the http client plugin.

The code below works on other PCs, but not on mine. 

Symptoms include:

- Not recognized when using request-related syntax.

code example like this.

###  API example
< {%
request.variables.set("client_id", "admin-cli");
request.variables.set("username", "username");
request.variables.set("password", "password");
request.variables.set("grant_type", "password");
%}
POST {{kc_base_url}}/realms/{{realm}}/protocol/openid-connect/token
Content-Type: application/x-www-form-urlencoded

grant_type={{grant_type}}&client_id={{client_id}}&username={{username}}&password={{password}}

> {%
client.global.set("access_token",response.body.access_token)
%}

then happens:

http://< {%

java.net.URISyntaxException: Illegal character in authority at index 7: http://<%20{%

And for other APIs, an execution button is displayed on the left of the API method, but the URL is not recognized as shown on the screen.

 

I tried re-running the plugin, resetting the cache, and changing the java version of the project, but the problem is the same. What should I do?

0

请先登录再写评论。