@app.route('/requests.<format>', methods=['GET', 'POST'])
def service_requests(format):
    if format not in ('json', 'xml'):
        abort(404)

    if request.method == 'POST':
        # Create service request
        sr = save(request.form)
        if format == 'json':
            return jsonify(sr)
        elif format == 'xml':
            repsonse = make_response(render_template('success.xml', sr=sr))
            response.headers['Content-Type'] = 'text/xml; charset=utf-8'
            return response
    else:
        # Return a list of SRs that match the query
        sr = search(request.form)
        if format == 'json':
            response = make_response(json.dumps(srs))
            response.headers['Content-Type'] = 'application/json; charset=utf-8'
            return response
        elif format == 'xml':
            response = make_response(render_template('service-requests.xml', service_requests=srs))
            response.headers['Content-Type'] = 'text/xml; charset=utf-8'
            return response
Retrieve a rectangular region of this image data.
dataset/ETHPy150Open miamidade/georeport-server/v2.py/service_requests--crossover with--dataset/ETHPy150Open ardekantur/pyglet/pyglet/image/__init__.py/ImageData.get_region