GithubHelp home page GithubHelp logo

Comments (10)

pmoule avatar pmoule commented on August 16, 2024 2

@toedter

BTW, the media type for HAL is application/hal+json

thx, fixed the typo

from hal-explorer.

pmoule avatar pmoule commented on August 16, 2024 1

@eiswind
The content-type in your response header is application/prs.hal-forms+json.
In this case only GET request is displayed in HAL Explorer.

In case you planned to make a HAL-FORMS example, this seems intended behaviour.
For a HAL example content-type should be application/hal+json.

Best
Patrick

from hal-explorer.

toedter avatar toedter commented on August 16, 2024 1

@pmoule, you are right. This is on purpose with HAl-FORMS media type, since HAL-FORMS provides affordances (_templates) for exactly those use cases. If you want to provide create or delete functionality, you would define the respective affordances.
BTW, the media type for HAL is application/hal+json

@eiswind, when you are using String HATEOAS you can choose from a list of supported media types. Spring Data REST only supported HAL in the past but they are also moving to HAL-FORMS.

from hal-explorer.

eiswind avatar eiswind commented on August 16, 2024 1

@pravinkalekar just set the content-type header to application/hal+json in the ui.

from hal-explorer.

pravinkalekar avatar pravinkalekar commented on August 16, 2024 1

@djkeh
Use the "Edit Headers" button in the top left corner next to the API URL to set the content-type header.

from hal-explorer.

eiswind avatar eiswind commented on August 16, 2024

Thanks for clearing this up! I didn't catch that change.

This must be a new behaviour of data-rest then. I just updated the spring boot version an got this new content-type w/o further changes. I'll have to investigate a little further.

from hal-explorer.

toedter avatar toedter commented on August 16, 2024

Thanks for pointing this out, I will check with latest Spring Data REST versions soon.

from hal-explorer.

pravinkalekar avatar pravinkalekar commented on August 16, 2024

@eiswind

This must be a new behaviour of data-rest then. I just updated the spring boot version an got this new content-type w/o further changes. I'll have to investigate a little further.

Did you find out how to suppress HAL-FORMS support in Spring Data REST or Spring HATEOAS for HAL Explorer to continue working for all HTTP Methods as it was working with previous versions of SpringBoot (2.4.9 earlier)?

from hal-explorer.

djkeh avatar djkeh commented on August 16, 2024

@eiswind

@pravinkalekar just set the content-type header to application/hal+json in the ui.

I still don't understand how to suppress hal-forms. I couldn't find the location to set the content-type header in the Spring Boot HAL explorer ui. Could you explain with more details to control it?

from hal-explorer.

djkeh avatar djkeh commented on August 16, 2024

@pravinkalekar Wow. I couldn't see that button. Thanks!

For those who want more accurate information, in order to get application/hal+json content-type response, I can set my request header using Accept key.

image
image

Tested on Spring Boot 2.5.4

from hal-explorer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.