GithubHelp home page GithubHelp logo

Comments (5)

nojaf avatar nojaf commented on July 23, 2024

This is actually a Json.NET thing, see https://gist.github.com/isaacabraham/ba679f285bfd15d2f53e.
Might be interesting to include these extra converters by default in Giraffe.
@dustinmoris thoughts?

from giraffe.

diegobfernandez avatar diegobfernandez commented on July 23, 2024

I meant Query String binding :)
This is the model I'm trying to bind to:

[<CLIMutable>]
type Query =
    { pattern: string
      page: int
      perPage: int
      userId: string
      dataViewId: int option }

and the code to do the binding:

let! query = ctx.BindQueryString<Query>()

That line gives me the exception.
I can give it a try and submit a PR if it seems doable.

I don't currently use JSON payload on my requests, althoug that link provide a lot of insights for future needs, I think for now it should be mentioned on docs and after people feedback may be enabled by default.

from giraffe.

nojaf avatar nojaf commented on July 23, 2024

Oh, my bad.

from giraffe.

dustinmoris avatar dustinmoris commented on July 23, 2024

Hey guys, yes I think we could add a case for options to the binding of the query string.

from giraffe.

diegobfernandez avatar diegobfernandez commented on July 23, 2024

I'll do a PR for this soon, just finishing the tests.

from giraffe.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.