Sending json post request in sketchup, no results returned in V2022

I was able to send and receive data in post request until Sketchup v2020(SU HttpRequest). Once when I tried the same from v2022, it wasn’t returning any response.

@request = Sketchup::Http::Request.new("http://localhost:8080")
@request.method = Sketchup::Http::POST

@request.start do |request, response|
  puts "request.method: #{request.method}"
end