Restangular - How do I reach this API using GET method?

后端 未结 1 375
终归单人心
终归单人心 2021-01-23 04:42

How do I make a GET call to a REST API with the below signature:

http://www.example.com/hierarchies/nodes/1005/parents

I am trying to call the

相关标签:
1条回答
  • 2021-01-23 05:22

    I think if you use all as the last part of the builder, a list is expected and you should use getList instead of get. However the object you are expecting does not look like a list, so you could change the last part of your builder to just use one without the second parameter and then a single object as the response will be expected.

    service.one('nodes', 5).one('parents').get().then(function(response) {
    });
    
    0 讨论(0)
提交回复
热议问题