{"action":"created","issue":{"url":"https://api.github.com/repos/haskell-servant/servant/issues/93","labels_url":"https://api.github.com/repos/haskell-servant/servant/issues/93/labels{/name}","comments_url":"https://api.github.com/repos/haskell-servant/servant/issues/93/comments","events_url":"https://api.github.com/repos/haskell-servant/servant/issues/93/events","html_url":"https://github.com/haskell-servant/servant/issues/93","id":79410696,"number":93,"title":"Add path prefix in client part","user":{"login":"s9gf4ult","id":105054,"avatar_url":"https://avatars.githubusercontent.com/u/105054?v=3","gravatar_id":"","url":"https://api.github.com/users/s9gf4ult","html_url":"https://github.com/s9gf4ult","followers_url":"https://api.github.com/users/s9gf4ult/followers","following_url":"https://api.github.com/users/s9gf4ult/following{/other_user}","gists_url":"https://api.github.com/users/s9gf4ult/gists{/gist_id}","starred_url":"https://api.github.com/users/s9gf4ult/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/s9gf4ult/subscriptions","organizations_url":"https://api.github.com/users/s9gf4ult/orgs","repos_url":"https://api.github.com/users/s9gf4ult/repos","events_url":"https://api.github.com/users/s9gf4ult/events{/privacy}","received_events_url":"https://api.github.com/users/s9gf4ult/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/haskell-servant/servant/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/haskell-servant/servant/labels/servant-client","name":"servant-client","color":"fad8c7"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2015-05-22T11:11:28Z","updated_at":"2015-05-28T19:13:04Z","closed_at":"2015-05-28T19:13:04Z","body":"Now \r\n\r\n```haskell\r\ndata BaseUrl = BaseUrl\r\n  { baseUrlScheme :: Scheme -- ^ URI scheme to use\r\n  , baseUrlHost :: String   -- ^ host (eg \"haskell.org\")\r\n  , baseUrlPort :: Int      -- ^ port (eg 80)\r\n  } deriving (Show, Eq, Ord, Generic)\r\n```\r\n\r\nand I propose to\r\n\r\n```haskell\r\ndata BaseUrl = BaseUrl\r\n  { baseUrlScheme :: Scheme -- ^ URI scheme to use\r\n  , baseUrlHost :: String   -- ^ host (eg \"haskell.org\")\r\n  , baseUrlPath :: [String] -- ^ api path prefix (eg \"/apiv1\")\r\n  , baseUrlPort :: Int      -- ^ port (eg 80)\r\n  } deriving (Show, Eq, Ord, Generic)\r\n```\r\n\r\nThis would be very usable when servant service is mounted as Yesod subsite for example. Like: \r\n\r\n```\r\n/apiv1 SomeApiR WaiSubsite getSomeApi\r\n```\r\n\r\nI beleive it is very common use case.\r\n\r\nThis is also required to add changes to `servant-jquery` package to generate right pathes in JS code."},"comment":{"url":"https://api.github.com/repos/haskell-servant/servant/issues/comments/106569534","html_url":"https://github.com/haskell-servant/servant/issues/93#issuecomment-106569534","issue_url":"https://api.github.com/repos/haskell-servant/servant/issues/93","id":106569534,"user":{"login":"s9gf4ult","id":105054,"avatar_url":"https://avatars.githubusercontent.com/u/105054?v=3","gravatar_id":"","url":"https://api.github.com/users/s9gf4ult","html_url":"https://github.com/s9gf4ult","followers_url":"https://api.github.com/users/s9gf4ult/followers","following_url":"https://api.github.com/users/s9gf4ult/following{/other_user}","gists_url":"https://api.github.com/users/s9gf4ult/gists{/gist_id}","starred_url":"https://api.github.com/users/s9gf4ult/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/s9gf4ult/subscriptions","organizations_url":"https://api.github.com/users/s9gf4ult/orgs","repos_url":"https://api.github.com/users/s9gf4ult/repos","events_url":"https://api.github.com/users/s9gf4ult/events{/privacy}","received_events_url":"https://api.github.com/users/s9gf4ult/received_events","type":"User","site_admin":false},"created_at":"2015-05-28T19:13:04Z","updated_at":"2015-05-28T19:13:04Z","body":"You right! It works!"}}