{ "id": "149329", "key": "TIMOB-19129", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "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": [ { "id": "16925", "description": "WatchKit Support--all going into 5.0 now", "name": "Release 5.0.0", "archived": true, "released": true, "releaseDate": "2015-09-16" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2015-07-07T18:31:29.000+0000", "created": "2015-07-01T11:04:38.000+0000", "priority": { "name": "None", "id": "6" }, "labels": [], "versions": [ { "id": "16723", "description": "Windows Platform Support, ListView updates, Vector overlays in maps", "name": "Release 4.1.0", "archived": false, "released": true, "releaseDate": "2015-07-08" } ], "issuelinks": [], "assignee": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "updated": "2015-09-03T21:51:21.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": "12642", "name": "Windows", "description": "Windows authoring support" } ], "description": "The following example shows that on Windows is not sending the {{User-Agent}} header (as well as {{X-Titanium-Id}}) like iOS and Android do. Many API's require this header to be set.\r\n\r\n{code:javascript}\r\nvar win = Ti.UI.createWindow();\r\nvar btn = Ti.UI.createButton({\r\n\ttitle: 'Click'\r\n});\r\nbtn.addEventListener('click', function (e) {\r\n\tvar client = Ti.Network.createHTTPClient();\r\n\tclient.open('GET', 'http://requestb.in/1fv1js61');\r\n\tclient.send();\r\n});\r\nwin.add(btn);\r\nwin.open();\r\n{code}\r\n\r\nh2. Windows\r\n\r\n{code}\r\nHost: requestb.in\r\nConnection: close\r\nX-Request-Id: 94581c18-95ea-468a-966d-0cf914d68859\r\nVia: 1.1 vegur\r\nTotal-Route-Time: 0\r\nConnect-Time: 0\r\nAccept-Encoding: gzip, deflate\r\n{code}\r\n\r\nh2. iOS\r\n\r\n{code}\r\nUser-Agent: Appcelerator Titanium/4.1.0 (iPhone/8.4; iPhone OS; nl_NL;)\r\nVia: 1.1 vegur\r\nConnection: close\r\nAccept: */*\r\nAccept-Language: nl-nl\r\nX-Request-Id: 600421ac-e5e7-4d10-9c48-2eabfab4489b\r\nConnect-Time: 1\r\nHost: requestb.in\r\nTotal-Route-Time: 0\r\nX-Titanium-Id: 92e3ee1a-2507-4c54-b3a0-3af19ccf0661\r\nAccept-Encoding: gzip, deflate\r\nX-Requested-With: XMLHttpRequest\r\n{code}\r\n\r\nh2. Android\r\n\r\n{code}\r\nX-Request-Id: e5cd2daa-9796-478f-924c-e8578edd6cdd\r\nX-Requested-With: XMLHttpRequest\r\nX-Titanium-Id: 92e3ee1a-2507-4c54-b3a0-3af19ccf0661\r\nConnection: close\r\nHost: requestb.in\r\nVia: 1.1 vegur\r\nTotal-Route-Time: 0\r\nUser-Agent: Appcelerator Titanium/4.0.0 (Nexus 5; Android API Level: 22; nl-NL;)\r\nConnect-Time: 0\r\n{code}", "attachment": [], "flagged": false, "summary": "Windows: HTTPClient does not send User-Agent", "creator": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "subtasks": [], "reporter": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "environment": "SDK 4.1.0 beta (4.1.0.v20150626223333)", "closedSprints": [ { "id": 443, "state": "closed", "name": "2015 Sprint 14 Windows", "startDate": "2015-07-06T04:01:52.896Z", "endDate": "2015-07-19T03:59:00.000Z", "completeDate": "2015-07-20T22:18:14.505Z", "originBoardId": 144 } ], "comment": { "comments": [ { "id": "362216", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "Verified using:\r\n\r\nWindows 8.1\r\nAppc CLI Core: 5.0.0-33\r\nAppc CLI NPM: 4.2.0-1\r\nTitanium SDK: 5.0.0.v20150902095518\r\nNokia Lumia 930 8.1\r\n\r\nHTTPClient now sends the user agent\r\n\r\n{code}\r\nTotal-Route-Time: 0\r\nUser-Agent: Appcelerator Titanium/5.0.0.v20150902095518 (NOKIA RM-1045_1044/6.3.9651.0; windowsphone; English_United States.1252;)\r\nHost: requestb.in\r\nAccept-Encoding: gzip, deflate\r\nConnect-Time: 8\r\nX-Request-Id: 097502e3-758b-4fbb-adec-ebffbb8ce2e7\r\nVia: 1.1 vegur\r\nX-Titanium-Id: 3b273aea-496f-4c86-9444-41f3fedfddd3\r\nConnection: close\r\n{code}\r\n\r\nClosing ticket", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2015-09-03T21:51:00.000+0000", "updated": "2015-09-03T21:51:00.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }