RestCode / WebApiProxy

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Please support Virtual Directories

wolfen351 opened this issue · comments

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

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.

Thanks for the pull request :)

Closing this issue

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.

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