REST Requests seem to be rejected by SF since Winter 23 hit our preview enabled sandbox.
Below sample code runs (run on Exec. anonymous) smoothly in v54 sandbox, but fails with below error in v55 (Winter 23) sandbox.
HttpRequest req = new HttpRequest();
req.setMethod('POST');
req.setEndpoint('callout:serviceContract/services/apexrest/GenerateContract/*');
req.setHeader('Content-Type', 'application/json;charset=UTF-8');
req.setBody('{"orientationId":"a1jp0000000xvGSAKY"}');
HTTPResponse res = new Http().send(req);
System.debug('body>> '+res.getBody());
System.debug('status>> '+res.getStatus());
System.debug('getHeaderKeys()>> '+res.getHeaderKeys());
System.debug('getStatusCode()>> '+res.getStatusCode());
System.debug('str>> '+res.toString());
Dev Console logged corresponding debug lines in v55 (Winter 23):
Any help to firgure out what new restriction/feature causing this issue? and any suggestions to workaround please? Thanks in advance.