def METHOD_NAME(self):
    coords = self.request.params.get('waypoints', '').split(',')
    lang = self.request.params.get('lang', 'fr')
    transport_mode = int(self.request.params.get('transportMode', 0))
    criteria = int(self.request.params.get('criteria', 0))
    avoid = self.request.params.get('avoid', '').split(',')
    prefer_bike_road =\
        int(self.request.params.get('preferBikeRoad', False))
    bike_avoid_hills =\
        int(self.request.params.get('bikeAvoidHills', False))
    if coords == ['']:
        coords = []
    # At least two waypoints (4 coordinates) are required
    if len(coords) < 4:
        routing_success = False
        return HTTPBadRequest("Not enough waypoints (At least 2 required)")
    else:
        r = GraphhopperRouter(self.config['routing']['graphhopper'])
        self.__setup_router(coords, lang, transport_mode, criteria,
                            avoid, prefer_bike_road, bike_avoid_hills,
                            r)
        try:
            r.execute()
        except HTTPError as e:
            if e.code == 429:
                r = MapquestRouter(self.config['routing']['mapquest'])
                self.__setup_router(
                    coords, lang, transport_mode,
                    criteria, avoid, prefer_bike_road,
                    bike_avoid_hills, r)
                r.execute()
            else:
                raise e
        if r.geom and len(r.geom) > 0:
            routing_success = True
        else:
            routing_success = False
            r.errorMessages.append('An error occured')
    try:
        routing_stats = RoutingStats()
        routing_stats.transport_mode = transport_mode
        routing_stats.transport_criteria = criteria
        DBSession.add(routing_stats)
    except Exception as e:
        log.exception(e)
        transaction.abort()
    if routing_success:
        json_response = {
            "type": "FeatureCollection",
            "features": [
                {'type': "Feature",
                 'properties': {
                    'success': routing_success,
                    'desc': r.desc, 'dist': int(r.dist),
                    'time': r.time,
                    'errorMessages': r.errorMessages,
                    'attribution': r.attribution},
                 'geometry': r.geom}]}
    else:
        json_response = {'success': routing_success,
                'geometry': None,
                'desc': [],
                'dist': 0,
                'time': 0,
                'errorMessages': r.errorMessages,
                'attribution': r.attribution}
    return json_response