Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update API default response in browsers to force application/json #360

Merged
merged 4 commits into from
Aug 9, 2023

Commits on Jul 19, 2023

  1. force the content-type

    Part of the problem with the PDS product is that when in a browser it is better viewed using a plugin. To this end, force the return type for text/html of a PDS product or list of products to be application/json. Lovely, but if you are accessig a product directly, it is kind of what you deserve and probably desire.
    
    Found how to set the content-type for the output. It can be overridden but required a rework of the list in WebMVCConfig. Turns out is is very order dependent. The current order seems to have everything working as desired while maybe not correctly.
    
    It also turns out that setting the content-type is also order dependent with requesting the body. Yikes so much hidden order requirements in the bowels of spring. Anyway, marked all of the converters with comments to hopefully keep their order correct.
    Al Niessner authored and Al Niessner committed Jul 19, 2023
    Configuration menu
    Copy the full SHA
    575b264 View commit details
    Browse the repository at this point in the history
  2. Update PdsProductTextHtmlSerializer.java

    put pretty print back in
    al-niessner authored Jul 19, 2023
    Configuration menu
    Copy the full SHA
    5529fdb View commit details
    Browse the repository at this point in the history
  3. Update PdsProductTextHtmlSerializer.java

    in the right place
    al-niessner authored Jul 19, 2023
    Configuration menu
    Copy the full SHA
    b476251 View commit details
    Browse the repository at this point in the history

Commits on Aug 9, 2023

  1. add text/html return as JSon for plural products responses

    thomas loubrieu committed Aug 9, 2023
    Configuration menu
    Copy the full SHA
    23c1f4f View commit details
    Browse the repository at this point in the history