Skip to content

Example of using dynamic parameters #73

Open
@slimandslam

Description

@slimandslam

When using a dynamic endpoint, e.g.

server.routes([
  {
    path: '/training/:id',
    methods: [
      {
        type: 'get',
        file: 'data/somenumbers.txt'
      },
    ],
  },

How do I return different data depending on whether the GET request is
from /training/1 or /training/2 ?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions