Code Monkey home page Code Monkey logo

Comments (8)

joanromano avatar joanromano commented on August 25, 2024 1

Since we want to align with Foundation as close as possible, may I suggest using queryParameters and components? @MP0w

from kakapo.

MP0w avatar MP0w commented on August 25, 2024 1

Fine for me

from kakapo.

MP0w avatar MP0w commented on August 25, 2024

related to #21

from kakapo.

zzarcon avatar zzarcon commented on August 25, 2024

I'll prefer instead something like this when declaring a handler like router.get('/users/:id') and performing a request like users/12?page=1&limit=10 with empty headers and body

{
  params: {id: "12"},
  query: {page: "1", limit: "10"},
  headers: {},
  body: {} 
}

Also, I don't like the HTTP prefix for any of the properties

from kakapo.

MP0w avatar MP0w commented on August 25, 2024

HTTP prefix is to align with the Foundation counterpart.
Your code is the same except the naming right?
Not sure if params is right because usually what you now called query is called params (that's why I was confused)

from kakapo.

MP0w avatar MP0w commented on August 25, 2024

Since /id/ is an URL component (NSURL call it that way) I was suggesting components, @joanromano ?

from kakapo.

zzarcon avatar zzarcon commented on August 25, 2024

Yes, my suggestion is all about naming, what i call query is usually called query or queryParams. I don't like components neither btw.

from kakapo.

rpunkfu avatar rpunkfu commented on August 25, 2024

I agree with @zzarcon in terms of naming, since Node.js names it in exactly this way

from kakapo.

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.