input: Write a function to create a web server using the Flask framework that serves a JSON object containing the current temperature for a city based on the city name given in the request. The function should handle a POST request at the /getTemp endpoint.
  
  from flask import Flask, request
  import requests
  import json
  
  def create_temp_server():
      app = Flask(__name__)
  
      @app.route('/getTemp', methods=['POST'])
      def get_temp():
          city = request.json['city']
          url = 'http://api.openweathermap.org/data/2.5/weather?q={}&APPID=xxxxxx'
          r = requests.get(url.format(city))
          weather = json.loads(r.text)
          return {'temperature': weather['main']['temp']}
  
      if __name__ == '__main__':
          app.run(debug=True)
  
  assert post_request_to_server('/getTemp', {'city': 'London'}) == {'temperature': 280.32}
  assert post_request_to_server('/getTemp', {'city': 'New York'}) == {'temperature': 279.5}
  assert post_request_to_server('/getTemp', {'city': 'Tokyo'}) == {'temperature': 285.15}
  assert post_request_to_server('/getTemp', {'city': 'Paris'}) == {'temperature': 278.15}
  assert post_request_to_server('/getTemp', {'city': 'Sydney'}) == {'temperature': 291.15}
output: 
  def create_temp_server():
      app = Flask(__name__)
  
      @app.route('/getTemp', methods=['POST'])
      def get_temp():
          city = request.json['city']
          url = 'http://api.openweathermap.org/data/2.5/weather?q={}&APPID=xxxxxx'
          r = requests.get(url.format(city))
          weather = json.loads(r.text)
          return {'temperature': weather['main']['temp']}
  
      if __name__ == '__main__':
          app.run(debug=True)
  