deblockt / hal-rest-client

Typescript HAL Rest client
Apache License 2.0
25 stars 11 forks source link

get link type #17

Closed Zordaxy closed 7 years ago

Zordaxy commented 7 years ago

Can we get custom fields like type from link? For example I have following link: txt: {href: "projects/path_to_file", type: "text/plain"}

And I want to use "type" for "Accept" header. But I can't get it from the link. I tried something like file.link("txt").prop("type"), file.link("txt").props , but it doesn't work.

Thanks!

deblockt commented 7 years ago

Yes, it’s actually not supported.

I will try to implement this feature soon.

deblockt commented 7 years ago

This feature have been added on '0.3.1' version. You can now use file.link("txt").prop("type") to get your link property.

Zordaxy commented 6 years ago

0.3.1 version doesn't have types. Doesn't it work for now? Or I've missed something?

deblockt commented 6 years ago

@Zordaxy I have fix the build, can you try with 0.3.2 version

Zordaxy commented 6 years ago

Works fine, thanks