api-builder icon indicating copy to clipboard operation
api-builder copied to clipboard

Parse Route from String/URL

Open erikkaplun opened this issue 9 years ago • 0 comments

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" }

erikkaplun avatar Oct 21 '15 11:10 erikkaplun