Skip to content
Branch: master
Find file Copy path
Find file Copy path
initial 3087e54 Dec 27, 2019
1 contributor

Users who have contributed to this file

16 lines (11 sloc) 326 Bytes
import os
import requests
from flask import Flask, request
api_port = os.environ['PORT_API']
api_url = f'http://slow_api:{api_port}/'
app = Flask(__name__)
def index():
delay = int(request.args.get('delay') or 1)
resp = requests.get(f'{api_url}?delay={delay}')
return 'Hi there! ' + resp.text
You can’t perform that action at this time.