For the benefit of anyone here (who happens to be using Ruby and Neography)
and finds the REST responses to be a little too verbose to be
readable/usable:
```ruby
def remove_hateoas_links(result)
if result.is_a?(Hash) && result["data"].present?
remove_hateoas_links(result["data"])
elsif result.is_a?(Array)
result.map{|a| remove_hateoas_links(a)}
else
result
end
end
```
This moves it back into the realms of being able to read and understand a
response for me. E.g. in writing tests etc.
On Thursday, August 2, 2012 6:08:30 AM UTC+9, Aseem Kishore wrote:
>
> That may have been what he meant, yeah. But so far, is that ever the case?
>
> On Wed, Aug 1, 2012 at 8:42 AM, Peter Neubauer <
> [email protected] <javascript:>> wrote:
>
>> You mean if a URL different than the current slef-URL of the server,
>> to the full length, otherwise relative?
>>
>> Cheers,
>>
>> /peter neubauer
>>
>> G: neubauer.peter
>> S: peter.neubauer
>> P: +46 704 106975
>> L: http://www.linkedin.com/in/neubauer
>> T: @peterneubauer
>>
>> Wanna learn something new? Come to @graphconnect.
>>
>>
>> On Tue, Jul 24, 2012 at 3:18 AM, nuba <[email protected] <javascript:>>
>> wrote:
>> >
>> > What is the case for absolute URLs? I imagine it could make sense if
>> one is
>> > partitioning the database in some way, spreading the graph in more
>> servers
>> > (sharding) and/or having specialized servers (e.g. one for the graph,
>> > another for the indexes). But even then, you could just use absolute
>> URLs
>> > when needed, and stick to relative, or root-relative ones, as the
>> default.
>> >
>> > +1 for root-relative URLs :)
>>
>
>
--
You received this message because you are subscribed to the Google Groups
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.