Refit: Win10 UWP - URL path must be of the form '/foo/bar/baz'

Created on 14 Sep 2015  Â·  4Comments  Â·  Source: reactiveui/refit

I'm having this issue in a native Win10 project.

The URL is properly formatted, and tracing the issue, it shows that for some reason, in RequestBuilderImplementation.cs, the extraction of the RelativePath does not succeed. It happens no matter what the URL is, as long as it is a valid URL.

Has anyone ran into this issue before? I'm on Build 10240.

outdated

Most helpful comment

This happened to me yesterday, you most likely forgot a beginning slash in the path on your interface.

[Get("users")]
// Should be..
[Get("/users")]

If any path in an interface is wrong, this error is thrown.

All 4 comments

How you use the refit c# for UWP @fonix232 ??
Can you help me?

I don't, I can't, because of this error. Otherwise, I'd use it as one uses
it in a generic .Net project.

On 23 September 2015 at 16:20, Rafael da Silva Ferreira <
[email protected]> wrote:

How you use the refit c# for UWP @fonix232 https://github.com/fonix232
??
Can you help me?

—
Reply to this email directly or view it on GitHub
https://github.com/paulcbetts/refit/issues/186#issuecomment-142616294.

This happened to me yesterday, you most likely forgot a beginning slash in the path on your interface.

[Get("users")]
// Should be..
[Get("/users")]

If any path in an interface is wrong, this error is thrown.

Indeed that has been the issue. I missed one of the interface beginning slashes (with an API of over 120 calls, it was easy to miss).

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ColKrumpler picture ColKrumpler  Â·  3Comments

ahmedalejo picture ahmedalejo  Â·  6Comments

jstafford5380 picture jstafford5380  Â·  4Comments

SOFSPEEL picture SOFSPEEL  Â·  4Comments

ML13 picture ML13  Â·  4Comments