Aleksandr, thank you for answer!
Nimble very sensitive to handle answer.
I use java spring boot, not python.
1. Block work.
---------------------------------------------------
@PostMapping({ "/nimble_auth" })
public ResponseEntity<String> nimble_auth(@RequestBody String requestBody) {
return ResponseEntity.ok("{\"return_code\":200}");
}
---------------------------------------------------
HTTP/1.1 200
Content-Type: text/plain;charset=ISO-8859-1
Content-Length: 19
Date: Sat, 05 Nov 2022 18:15:48 GMT
{"return_code":403}
---------------------------------------------------
2. Block NOT work.
---------------------------------------------------
@PostMapping({ "/nimble_auth" })
public ResponseEntity<?> nimble_auth(@RequestBody String requestBody) {
JSONObject jres = null;
JSONParser parser = new JSONParser();
try {
jres = (JSONObject) parser.parse("{\"return_code\":403}");
} catch (Exception e) {
LOGGER.error("Internal error {}", e);
return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(e.getMessage());
}
return ResponseEntity.ok(jres);
}
---------------------------------------------------
HTTP/1.1 200
Content-Type: application/json
Transfer-Encoding: chunked
Date: Sat, 05 Nov 2022 18:24:23 GMT
{"return_code":403}
---------------------------------------------------
I will be more careful, thank you!