New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
withLink() example backwards? #34
Comments
Hey James, Good spotting. Some time ago I switched the order of the parameters I'm tempted to switch them over to taking a URL/URI rather than just a Mark On 19/06/12 4:42 PM, James Ladd wrote:
|
Hi Mark, I really like where you are going with the HalBuilder and it has got me off I think a withLink(); that takes a URI/URL is useful - however I find that That being said, you are building a library so supporting both would be the Rgs, James. On Tue, Jun 19, 2012 at 2:58 PM, Mark Derricutt <
|
In the README there is the example:
Resource owner = resourceFactory.newResource("http://example.com/mike")
.withLink("td:friend", "http://example.com/mamund")
When I run this the resulting JSON looks like this:
{
"_links":
{
"self":
{
"href":"http://localhost/api/..."
},
"http://example.com/mamund":
{
"href":"td:friend"
}
}
}
This looks wrong. However, when I switch the parameters around like this:
.withLink("http://example.com/mamund", "td:friend")
Then I get a namespace error because 'td' is not defined.
When I remove the namespace prefix td: then all is ok.
So is the examples parameters around the wrong way??
The text was updated successfully, but these errors were encountered: