parameters: (self)
return_statement: return ret_val
docstring: processes post requests
docstring_summary: processes post requests
docstring_tokens: processes post requests
function: def process_req(self):
          """processes post requests"""
  
          ret_val = ""
  
          if self.request.headers["Content-Type"].startswith("application/json"):
              req = json.loads(self.request.body)
          else:
              req = None
  
          if (req is not None):
              resp = self.process_bid(req)
  
              if (resp is not None):
                  self.set_status(200)
                  self.set_header("Content-type", "application/json")
                  self.set_header("x-openrtb-version", "2.1")
                  ret_val = json.dumps(resp)
  
              else:
                  # print("process_bid error")
                  self.set_status(204)
                  ret_val = "Error\n"
          else:
              # print("request not json")
              self.set_status(204)
              ret_val = "Error\n"
  
          # print DEBUG
          # print("req: " + self.request.body)
          # print("resp: " + ret_val)
  
          return ret_val
function_tokens: def process_req ( self ) : ret_val = "" if self . request . headers [ "Content-Type" ] . startswith ( "application/json" ) : req = json . loads ( self . request . body ) else : req = None if ( req is not None ) : resp = self . process_bid ( req ) if ( resp is not None ) : self . set_status ( 200 ) self . set_header ( "Content-type" , "application/json" ) self . set_header ( "x-openrtb-version" , "2.1" ) ret_val = json . dumps ( resp ) else : # print("process_bid error") self . set_status ( 204 ) ret_val = "Error\n" else : # print("request not json") self . set_status ( 204 ) ret_val = "Error\n" # print DEBUG # print("req: " + self.request.body) # print("resp: " + ret_val) return ret_val