SaturnFramework / Saturn

Opinionated, web development framework for F# which implements the server-side, functional MVC pattern
https://saturnframework.org
MIT License
714 stars 109 forks source link

DELETE and GET request id is not correct in the controller function #162

Closed MarneeDear closed 5 years ago

MarneeDear commented 5 years ago

Possibly related to issue #160 .

DELETE requests to a path with an id doesn't parse the id.

For example

DELETE to http://saturn.local:8085/delete/11 In the controller delete function the id is delete/11, but it should be 11

I used Controller.Sample to repro this in a forked branch here: https://github.com/MarneeDear/Saturn/blob/delete-path-parse/sample/Controller.Sample/Controller.Sample.fs#L82

I suspect this is why I get a 404 when the id type is int instead of string in issue #160

Update

I am seeing the same problem with getf. See Controller.Sample in my fork here:

https://github.com/MarneeDear/Saturn/blob/delete-path-parse/sample/Controller.Sample/Controller.Sample.fs#L84

Other details

Using dotnet on Windows 10 Saturn master branch as of 12/23/2018 at 10pm MDT

MarneeDear commented 5 years ago

Can anyone repro this?

Krzysztof-Cieslak commented 5 years ago

This should be fixed by #168.