RestCode / WebApiProxy

MIT License
199 stars 91 forks source link

Please support Virtual Directories #60

Closed wolfen351 closed 8 years ago

wolfen351 commented 9 years ago

Hi there

Our server (while developing) looks something like this:

http://localhost/FancyAPI/api/proxies

When the code is generated, I think it converts the URL into the base form, losing the FancyAPI virtual directory bit: http://localhost/ControllerName/ActionName

Please will you add a config parameter / property that we can use to set the url of the server?

Many thanks

dahauns commented 9 years ago

But a parameter shouldn't be neccessary, should it?

Maybe I'm overlooking something, but shouldn't it be enough to add the virtual path root to the base url? Like so: https://gist.github.com/dahauns/ac36d4755a97fa75a5fc#file-metadataprovider-cs-L30

A preliminary test both with and without a virtual directory looks good so far.

wolfen351 commented 8 years ago

Thanks for the pull request :)

faniereynders commented 8 years ago

Closing this issue

faniereynders commented 8 years ago

After some confusion I am re-opening this issue as the PR #42 does not solve the virtual directory issue for JavaScript. More investigation is needed to come up with a better solution. Thank you @dahauns you just might have something there with your gist https://gist.github.com/dahauns/ac36d4755a97fa75a5fc#file-metadataprovider-cs-L30.

faniereynders commented 8 years ago

The updated commit addresses this issue. Safe to close no for realz