This commit is contained in:
parent
23905e7177
commit
0c4c15b75c
1 changed files with 1 additions and 4 deletions
5
app.py
5
app.py
|
@ -7,10 +7,7 @@ def show_headers():
|
|||
# Get headers from request object
|
||||
headers = dict(request.headers)
|
||||
|
||||
# Convert the headers dictionary into a string with key-value pairs separated by commas
|
||||
headers_str = '\n'.join(f'{key}: {value}' for key, value in headers.items())
|
||||
|
||||
return f'Headers:\n{headers_str}'
|
||||
return headers, 200
|
||||
|
||||
if __name__ == '__main__':
|
||||
app.run(debug=True)
|
||||
|
|
Loading…
Add table
Reference in a new issue