{ "id": "92894", "key": "TIMOB-9418", "fields": { "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [], "resolution": { "id": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2012-06-15T13:27:55.000+0000", "created": "2012-06-06T11:14:39.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "updated": "2014-06-19T12:44:35.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "11500", "name": "MobileWeb", "description": "Mobile Web (HTML) Platform" } ], "description": "h4. Problem Description\r\nOur customer is having different environments where the app is running (Dev, QA, Prod), and would like to do calls via httpclient into the right domain, according to where is it. \r\n\r\nCurrently, there is no way to know where are you running, so you do a call properly to the right domain/server. \r\n\r\n", "attachment": [], "flagged": false, "summary": "MobileWeb: Getting a way to know which is the current domain from where the mobile web is running", "creator": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "subtasks": [], "reporter": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "environment": null, "comment": { "comments": [ { "id": "198178", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "Can't you just do this:\r\n\r\n{code}\r\nvar domain = Ti.Platform.osname == \"mobileweb\" ? location.hostname : \"\";\r\n{code}", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2012-06-12T11:26:27.000+0000", "updated": "2012-06-12T11:26:27.000+0000" }, { "id": "198700", "author": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "body": "notified the customer about this. \r\n\r\nThansk!\r\n\r\nMauro ", "updateAuthor": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "created": "2012-06-15T11:01:46.000+0000", "updated": "2012-06-15T11:01:46.000+0000" }, { "id": "198739", "author": { "name": "ngupta", "key": "ngupta", "displayName": "Neeraj Gupta", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Marking this feature request invalid as there was already a better way to achieve the desired functionality.", "updateAuthor": { "name": "ngupta", "key": "ngupta", "displayName": "Neeraj Gupta", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-06-15T13:27:55.000+0000", "updated": "2012-06-15T13:27:55.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }