• 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
  • Paul Clapham
  • Ron McLeod
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Rob Spoor
  • Devaka Cooray
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Jj Roberts
  • Al Hobbs
  • Piet Souris

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: 13376
295
  • 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: 13376
295
  • 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: 13376
295
  • 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: 13376
295
  • 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?
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic