Open RiteshVarpe opened 9 months ago
The code that adds an internal view when no content type is passed is:
I don't know what would cause this inconsistent behavior, and have limited time to investigate.
If you are in a hurry, as a workaround, you could try to add a default request header?
from pyramid.events import NewRequest
def set_default_header(event):
request = event.request
request.headers.setdefault("Accept", "application/json")
config.add_subscriber(set_default_header, NewRequest)
A. requirements.txt
B. webserver/init.py
C. webserver/views.py
D. Client code