• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

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

 
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
how to get link when we call a hateos in spring rest??
 
Saloon Keeper
Posts: 14499
325
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 14499
325
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 14499
325
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 14499
325
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
and POOF! You're gone! But look, this tiny ad is still here:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic