Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6964083
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T15:52:48+00:00 2026-05-27T15:52:48+00:00

Is it bad practice to test for reachibility of a web service by using

  • 0

Is it bad practice to test for reachibility of a web service by using a NSURLConnection call on a certain method that returns YES if the connection exists?

I looked at other ways of doing it but couldn’t figure out ho to test if the specific service is available rather than WiFI or the like.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T15:52:48+00:00Added an answer on May 27, 2026 at 3:52 pm

    There’s SCNetworkReachability (see Apple’s Reachability sample code) but that only checks whether a server should be reachable, it doesn’t tell you whether a service is actually available (running). For that you do have to try to use it. Just make sure to not use sendSynchronousRequest:returningResponse:error: on the main thread as that is synchronously and will block the thread until it’s done. If you do that on the main thread the UI will freeze until either the service has responded or timed out. So either use the asynchronous methods of NSURLConnection (the “recommended” way) or use the synchronous method on a separate thread. The former is easier/better in my opinion.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is it considered bad practice to have multiple try's in one method and structure
Is it generally considered bad practice to provide Iterator implementations that are infinite; i.e.
Is it bad practice to issue the following POST request: /test?a=1&b=2 POST data: c=3&d=4
I've been told at school that it's a bad practice to modify the index
In SQL Server, using NOT EXISTS in queries are considered bad practice and I've
Is it bad practice to have more than one assertion in a unit test?
I realize that this would be COMPLETELY bad practice in normal situations, but this
Consider the following test case, is it a bad practice to use the hashCode
Is it bad practice/design to nest components inside components using Flex 4? Should I
I have the following JUnit test. The method that I'm testing is quite simple,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.