Git Product home page Git Product logo

toki-discussion's Introduction

Toki Discussion

This repo is designed to capture and make public all discussion and work around the Toki Project. Please use Github Flavored Markdown and doctoc for any TOCs.

toki-discussion's People

Contributors

dhinklexo avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

toki-discussion's Issues

Role of toki-methods regarding http response sending

Pulling this line of discussion into an issue rather than in-line comments in a merged PR.

"Archived" comments below came from this PR

WesTyler 13 minutes ago โ€ข edited Member

@dhinklexo does calling something like response.send(payload) from within the method (like toki-method-http) simply attach that payload to the response that will eventually be sent by Toki? Or does it actually fire off the response object back to the client?

Basically do the toki plugins act like hapi prerequest handlers/decorators, or like the actual request handlers?

WesTyler 12 minutes ago Member

Or is this just a response object that is sent back to Toki to map to the main response and runtime context?

dhinklexo 9 minutes ago Member

(Context)
This is just a copy of the bridge response/request API

(Answer)
It looks like that IS the current behavior. Whether or not that's the desired behavior on the other hand..

WesTyler 4 minutes ago Member

My understanding from our initial talks about toki-method-http and toki-method-rabbit is that the method should define the shape of its result (via templated config) and do 2 things:

  1. pass that response back to toki, which will add it to the runtime context under the action's name property. future potential actions now have access to this mapped result.
  2. modify the "main" response object without sending it back to the client. This way toki can build up the main response by running it through all of the methods, then at the end send the total hydrated response back to the requesting client.

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.