docstr: Reads post request body
docstr_tok: ["Reads","post","request","body"]
code: def do_POST(self):
      """Reads post request body"""
      self._set_headers()
      content_len = int(self.headers["content-length"])
      content_type = self.headers["content-type"]
      assert content_type == "application/json"
      path = self.path
      post_body = self.rfile.read(content_len).decode("utf-8")
      post_body_json = json.loads(post_body)
      with self._handler_lock:
          response_body_json = self.handle_POST(path, post_body_json)
      response_body = json.dumps(response_body_json)
      self.wfile.write(response_body.encode("utf-8"))
  
file_path: ray/python/ray/autoscaler/_private/spark/spark_job_server.py
imports: import json
  import logging
  import threading
  from http.server import BaseHTTPRequestHandler, ThreadingHTTPServer
  from pathlib import Path
  from pyspark.util import inheritable_thread_target
  from ray.util.spark.cluster_init import _start_ray_worker_nodes
label_desc: Use image node_id 4 for calling the SparkJobServerRequestHandler obj's underlying member method code with example usage: obj.do_POST() without return types