-
-
Notifications
You must be signed in to change notification settings - Fork 413
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to Capture with .ext suffix? #1647
Comments
Hi! :) I have a preliminary question: Would this pattern (getting a identifier without the extension) be specific to an endpoint, or is it something that many endpoints would make use of? |
Many endpoints would be able to use it; in my usecase not only |
I figured out the compile issue! |
@achea sorry for the late response! Sure, send us a PR. :) |
Hi, I have an API that I'm querying which in simplest form looks like:
/int.json
The type I tried is:
type publicAPI = Capture "index" Int :> ".json" :> Get '[JSON] PublicData
But it constructs a query with an additional slash:
/int/.json
Is there a way to remove that slash?
I'm not too good with higher haskell and tried to make a new combinator building off of the existing Capture but it doesn't compile:
The error looks like like somewhere is missing an argument, but I don't understand it:
How would I write this if this the way to go or is there a better way?
The text was updated successfully, but these errors were encountered: