• Post Reply Bookmark Topic Watch Topic
  • New Topic

how to get link when we call a hateos in spring rest?  RSS feed

 
eugene malcolumn
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how to get link when we call a hateos in spring rest??
 
Stephan van Hulst
Saloon Keeper
Posts: 7821
142
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please make your question a little bit clearer.

There's no such thing as "a hateos". It's HATEOAS and it's an abstract concept and not "something you can call".

What link do you want to get? From where?
 
eugene malcolumn
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Stephan van Hulst wrote:Please make your question a little bit clearer.

There's no such thing as "a hateos". It's HATEOAS and it's an abstract concept and not "something you can call".

What link do you want to get? From where?


just wanna know client code with a bit explanation...
 
Stephan van Hulst
Saloon Keeper
Posts: 7821
142
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, it depends on the format in which your REST API sends its responses. For instance, if you follow the quick start here, you will get a response from the server similar to:

You can create a very simple JavaScript client that displays the content, and adds a navigation bar that contains a home button that links to the root page, a refresh button that links to the "self" url, and additional buttons for any other links that may appear in the "_links" property.
 
eugene malcolumn
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Stephan van Hulst wrote:Well, it depends on the format in which your REST API sends its responses. For instance, if you follow the quick start here, you will get a response from the server similar to:

You can create a very simple JavaScript client that displays the content, and adds a navigation bar that contains a home button that links to the root page, a refresh button that links to the "self" url, and additional buttons for any other links that may appear in the "_links" property.

wanted to create a java client only.
 
Stephan van Hulst
Saloon Keeper
Posts: 7821
142
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
eugene malcolumn wrote:wanted to create a java client only.

Okay, so what's stopping you? If you know whether the response is going to be in JSON or XML or something you can use the appropriate parser, then look for the _links property and display them in a component that handles navigation for you.
 
eugene malcolumn
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Stephan van Hulst wrote:
eugene malcolumn wrote:wanted to create a java client only.

Okay, so what's stopping you? If you know whether the response is going to be in JSON or XML or something you can use the appropriate parser, then look for the _links property and display them in a component that handles navigation for you.

whats the type to catch-in a hrefih hateoas??
 
Stephan van Hulst
Saloon Keeper
Posts: 7821
142
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm sorry, I can't understand what you wrote. Please be more clear in what you're trying to do and what the problem is.
 
eugene malcolumn
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Stephan van Hulst wrote:I'm sorry, I can't understand what you wrote. Please be more clear in what you're trying to do and what the problem is.



how do i make a POJO for this?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!