Skip to content

Parse Route from String/URL #5

Description

@erikkaplun

It would be nice if one could convert something like

http://api.stackexchange.com/2.2/questions?order=asc&min=1413849600&sort=creation&tagged=frp&site=stackoverflow&filter=*1FDl3RYdSl

into a Route without having to manually parse the URL elements into something like:

questionsRoute = Route { urlPieces = [ "2.2", "questions" ]
                       , urlParams = [ "order" =. ("desc"          :: Text)
                                     , "sort"  =. ("creation"      :: Text)
                                     , "site"  =. ("stackoverflow" :: Text)
                                     , ...                                   ]
                       , httpMethod = "GET" }

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions