René's URL Explorer Experiment


Title: http timeout seems not to work · Issue #6523 · NativeScript/NativeScript · GitHub

Open Graph Title: http timeout seems not to work · Issue #6523 · NativeScript/NativeScript

X Title: http timeout seems not to work · Issue #6523 · NativeScript/NativeScript

Description: Environment Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project): CLI: Cross-platform modules: 4.2.1 Android Runti...

Open Graph Description: Environment Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project): CLI: Cro...

X Description: Environment Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project): CLI: Cro...

Opengraph URL: https://github.com/NativeScript/NativeScript/issues/6523

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"http timeout seems not to work","articleBody":"**Environment**\r\nProvide version numbers for the following components (information can be retrieved by running `tns info` in your project folder or by inspecting the `package.json` of the project):\r\n - CLI: \r\n - Cross-platform modules: 4.2.1\r\n - Android Runtime: 4.2.0\r\n - iOS Runtime: -\r\n - Plugin(s): -\r\n\r\n**Describe the bug**\r\nI try to set a timeout for our http requests in our NativeScript app, but the [timeout](https://docs.nativescript.org/api-reference/interfaces/_http_.httprequestoptions#timeout) property has no effect for me while testing. \r\n\r\n**To Reproduce**\r\nHere is what I am doing:\r\n\r\n```\r\nhttpModule.request({\r\n        url: \"http://www.mocky.io/v2/5be3174d2f00007b00ca2260?mocky-delay=10000ms\",\r\n        timeout: 5000,\r\n        method: \"GET\",\r\n        headers: { }\r\n}).then((response) =\u003e {\r\n        const result = response.content.toJSON();\r\n\r\n        alert(\"Received response: \" + response.content);\r\n    }, (e) =\u003e {\r\n});\r\n```\r\nThe provided url leads to a sample webservice from [https://www.mocky.io/](https://www.mocky.io/) and the delay is set to 10 seconds.\r\n\r\nOpen the provided sample app and tap the button.\r\nIt will start the http request and after about 10 seconds, you get an alert with the json response.\r\n\r\n**Expected behavior**\r\nSetting the timeout to **5000 ms**, I would expect, that the http request was canceled and that I would get to the failure part of the Promise.\r\n\r\n**Sample project**\r\n[NSHttpTimeout.zip](https://github.com/NativeScript/NativeScript/files/2558436/NSHttpTimeout.zip)\r\n\r\n\r\n**Additional context**\r\nMaybe I am misunderstanding the sense of the timeout property.\r\nThe reason for me setting this property:\r\nI want to prevent, that the user waits for a long time to get the response of an http request. Instead there should be a 'maximum' time (i.e. 10 seconds) for the user to wait and when this time has passed, the loading indicator should be hidden and it should ignore the response of this request, if it is received later.\r\nIs this not the function of the timeout property?\r\n\r\n\u003cbountysource-plugin\u003e\r\n\r\n---\r\nWant to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/65492638-http-timeout-seems-not-to-work?utm_campaign=plugin\u0026utm_content=tracker%2F12908224\u0026utm_medium=issues\u0026utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin\u0026utm_content=tracker%2F12908224\u0026utm_medium=issues\u0026utm_source=github).\r\n\u003c/bountysource-plugin\u003e","author":{"url":"https://github.com/felixkrautschuk","@type":"Person","name":"felixkrautschuk"},"datePublished":"2018-11-07T17:21:15.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":5},"url":"https://github.com/6523/NativeScript/issues/6523"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:d9f3a7fb-6110-3eca-2f2a-0087110accfd
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id86F6:290A9F:997EA5:CCFAA9:69740088
html-safe-nonce426f78cc0d700433f1711a484c42f6188e98081df53a8c2795ff76e4cc38c7ac
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NkY2OjI5MEE5Rjo5OTdFQTU6Q0NGQUE5OjY5NzQwMDg4IiwidmlzaXRvcl9pZCI6IjYwMTE5ODY4MjIwMzA0MjYyNDgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac22f91cae6c857b488142de5166ca13a03bee2959b238a314edcfc38bb21289df
hovercard-subject-tagissue:378389115
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/NativeScript/NativeScript/6523/issue_layout
twitter:imagehttps://opengraph.githubassets.com/a376af101dd097fa713699e36dcad5baac4df738564720db8131c9b34c13f329/NativeScript/NativeScript/issues/6523
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/a376af101dd097fa713699e36dcad5baac4df738564720db8131c9b34c13f329/NativeScript/NativeScript/issues/6523
og:image:altEnvironment Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project): CLI: Cro...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamefelixkrautschuk
hostnamegithub.com
expected-hostnamegithub.com
None2e0119fb6c27766bcaf7c7facecf6a01e2e3f46178600e1ae4cd18f39f26d07e
turbo-cache-controlno-preview
go-importgithub.com/NativeScript/NativeScript git https://github.com/NativeScript/NativeScript.git
octolytics-dimension-user_id7392261
octolytics-dimension-user_loginNativeScript
octolytics-dimension-repository_id31492490
octolytics-dimension-repository_nwoNativeScript/NativeScript
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id31492490
octolytics-dimension-repository_network_root_nwoNativeScript/NativeScript
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release537b85d925713805fbaf32aee83b4c1b4506dd82
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/NativeScript/NativeScript/issues/6523#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FNativeScript%2FNativeScript%2Fissues%2F6523
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FNativeScript%2FNativeScript%2Fissues%2F6523
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=NativeScript%2FNativeScript
Reloadhttps://github.com/NativeScript/NativeScript/issues/6523
Reloadhttps://github.com/NativeScript/NativeScript/issues/6523
Reloadhttps://github.com/NativeScript/NativeScript/issues/6523
NativeScript https://github.com/NativeScript
NativeScripthttps://github.com/NativeScript/NativeScript
Please reload this pagehttps://github.com/NativeScript/NativeScript/issues/6523
Notifications https://github.com/login?return_to=%2FNativeScript%2FNativeScript
Fork 1.7k https://github.com/login?return_to=%2FNativeScript%2FNativeScript
Star 25.4k https://github.com/login?return_to=%2FNativeScript%2FNativeScript
Code https://github.com/NativeScript/NativeScript
Issues 869 https://github.com/NativeScript/NativeScript/issues
Pull requests 61 https://github.com/NativeScript/NativeScript/pulls
Discussions https://github.com/NativeScript/NativeScript/discussions
Actions https://github.com/NativeScript/NativeScript/actions
Projects 0 https://github.com/NativeScript/NativeScript/projects
Wiki https://github.com/NativeScript/NativeScript/wiki
Security 0 https://github.com/NativeScript/NativeScript/security
Insights https://github.com/NativeScript/NativeScript/pulse
Code https://github.com/NativeScript/NativeScript
Issues https://github.com/NativeScript/NativeScript/issues
Pull requests https://github.com/NativeScript/NativeScript/pulls
Discussions https://github.com/NativeScript/NativeScript/discussions
Actions https://github.com/NativeScript/NativeScript/actions
Projects https://github.com/NativeScript/NativeScript/projects
Wiki https://github.com/NativeScript/NativeScript/wiki
Security https://github.com/NativeScript/NativeScript/security
Insights https://github.com/NativeScript/NativeScript/pulse
New issuehttps://github.com/login?return_to=https://github.com/NativeScript/NativeScript/issues/6523
New issuehttps://github.com/login?return_to=https://github.com/NativeScript/NativeScript/issues/6523
#8194https://github.com/NativeScript/NativeScript/pull/8194
http timeout seems not to workhttps://github.com/NativeScript/NativeScript/issues/6523#top
#8194https://github.com/NativeScript/NativeScript/pull/8194
https://github.com/tsonevn
backloghttps://github.com/NativeScript/NativeScript/issues?q=state%3Aopen%20label%3A%22backlog%22
bughttps://github.com/NativeScript/NativeScript/issues?q=state%3Aopen%20label%3A%22bug%22
os: androidhttps://github.com/NativeScript/NativeScript/issues?q=state%3Aopen%20label%3A%22os%3A%20android%22
https://github.com/felixkrautschuk
https://github.com/felixkrautschuk
felixkrautschukhttps://github.com/felixkrautschuk
on Nov 7, 2018https://github.com/NativeScript/NativeScript/issues/6523#issue-378389115
timeouthttps://docs.nativescript.org/api-reference/interfaces/_http_.httprequestoptions#timeout
https://www.mocky.io/https://www.mocky.io/
NSHttpTimeout.ziphttps://github.com/NativeScript/NativeScript/files/2558436/NSHttpTimeout.zip
Post a bounty on it!https://www.bountysource.com/issues/65492638-http-timeout-seems-not-to-work?utm_campaign=plugin&utm_content=tracker%2F12908224&utm_medium=issues&utm_source=github
Bountysourcehttps://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F12908224&utm_medium=issues&utm_source=github
tsonevnhttps://github.com/tsonevn
backloghttps://github.com/NativeScript/NativeScript/issues?q=state%3Aopen%20label%3A%22backlog%22
bughttps://github.com/NativeScript/NativeScript/issues?q=state%3Aopen%20label%3A%22bug%22
os: androidhttps://github.com/NativeScript/NativeScript/issues?q=state%3Aopen%20label%3A%22os%3A%20android%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.