Git Product home page Git Product logo

Comments (9)

NielsLiisberg avatar NielsLiisberg commented on August 17, 2024

Absolutely! I have not made anything in the request yet - please stay tuned. And thank you for your feedback

from ileastic.

worksofliam avatar worksofliam commented on August 17, 2024

As a follow up, I had an idea for routing parts.

For example, if you'd like to make a dynamic rest API: the URL could be split up into parts.

getURLPart(request.url:1); //where request.url = '/id/101', would return '101'

from ileastic.

worksofliam avatar worksofliam commented on August 17, 2024

Just to keep notes. request.url and request.resource were both added in 46e327e.

from ileastic.

m1h43l avatar m1h43l commented on August 17, 2024

Each ILEastic definitely needs to handle multiple endpoints. It would scale really bad if you need to have one service running for each endpoint.

I think we need to split the registering of an endpoint from the starting of the server (as it is now with the il_listen function).

The minimum parts for adding an endpoint should be the address of the endpoint, url and HTTP method.

In modern frameworks the available content types (for the return value) is also part of the routing.

from ileastic.

m1h43l avatar m1h43l commented on August 17, 2024

For example, if you'd like to make a dynamic rest API: the URL could be split up into parts.

This should be no feature but a default requirement to the framework. It is not possible to build a decent API without accessing the single parts of the URL.

from ileastic.

NielsLiisberg avatar NielsLiisberg commented on August 17, 2024

Partly solved - routing is added, but picking the parameters are still missing

from ileastic.

NielsLiisberg avatar NielsLiisberg commented on August 17, 2024

working on the "parameter pickup" now ...

from ileastic.

m1h43l avatar m1h43l commented on August 17, 2024

Path segments can now be retrieved by index, see il_getRequestSegmentByIndex() . Can we close this issue?

from ileastic.

NielsLiisberg avatar NielsLiisberg commented on August 17, 2024

Yes let's close it: Now there is two options to the solution. Your @m1h43l il_getRequestSegmentByIndex() and my callback solution with regex. They both server a their own purpose. Great work @m1h43l !!

from ileastic.

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.