Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.
This repository was archived by the owner on Feb 26, 2024. It is now read-only.

Cannot handle multilevel URI's #233

Open

Description

@lefebvresam

I would like to handle requests such as:

get("api/buildings")
and
get("api/buildings/details?id=1")

But this seems not to be working.

I'm restricted to:
get("api/buildings")
and
get("api/buildingdetails/1")

The info in the help is very limited on that.

Activity

  1. cogitaria-admin commented on Mar 3, 2019

    @cogitaria-admin

    Multiple segments is clearly a fundamental requirement but in the author's defense he stipulates this is only a toy library and "not for production". He also notes he will break at-will versus using semantic versioning? Not sure why that's the case. Anyway, he's at least honest about limitations. It's a nice little tool for what it was intended for.

    You can actually change the property names to strings, but you'll get "unknown ID fruits" or an error to that effect if you add a key "/produce/fruits/citrus" for example.

    produce/
    produce/fruits
    produce/fruits/citrus

    It's unfortunate because it's relatively close to being more generally useful. I think I will start from scratch and add a simple key-value lookup where key is URL and value is JSON response. So essentially you add an interceptor (easy and baked into Angular HTTP) that does a look-up of the URL on a dictionary. Something like that.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions