Restler icon indicating copy to clipboard operation
Restler copied to clipboard

Output format in the middle of URL when using arguments.

Open yeehahboogie opened this issue 11 years ago • 2 comments

If i have

@url GET science/soilwater/{stationId}/{soilId}

Then I would expect the URL for the endpoint to be

science/soilwater/12/1.json

But Restler is forcing it to

science/soilwater.json/12/1

Is this by design?

yeehahboogie avatar Jun 15 '15 08:06 yeehahboogie

Actually both the endpoints work with restler

I guess you are referring to the Explorer. Yes Explorer is configured to act that way

You can change that behavior by adding the following to index.php

use Luracast\Restler\Resources

Resources::$placeFormatExtensionBeforeDynamicParts = false;

If you are using RC6 or higher use Luracast\Restler\Explorer\$placeFormatExtensionBeforeDynamicParts instead

Arul- avatar Jun 15 '15 09:06 Arul-

Awesome thanks a bunch!

yeehahboogie avatar Jun 16 '15 02:06 yeehahboogie