Closed ShaneMill1 closed 3 years ago
Found the issue, need to add logic for both content-type and outputFormat:
def root(self, headers, args):
"""
Provide API
:param headers: dict of HTTP headers
:param args: dict of HTTP request parameters
:returns: tuple of headers, status code, content
"""
if args.get('outputFormat'):
content_type=args.get('outputFormat')
else:
content_type=headers['Content-Type']
In addition, need to change "outputFormat" to "f"
Above noted changes have been made in a testing environment. Will push to public facing page after hours.
Finally, changes were made to make the JSON output for the landing page more complete to contain a title, description, and links list.
these changes have been pushed to the public facing page
@ghobona reported to me that the landing page of the API only returns in HTML. When sending a header for content-type being application/json, the response for the landing page still only returns HTML.
This is not intended so I will look into modifying the implementation in a test environment first before redeploying to the public facing page