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 8124805
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T06:35:09+00:00 2026-06-06T06:35:09+00:00

I am trying to post a URL to the server using the Asynchronous type

  • 0

I am trying to post a URL to the server using the Asynchronous type like

_urlConn = [[NSURLConnection alloc] initWithRequest:_urlReq delegate: self];

I getting proper response, and I am handling the response well using the delegate methods such as didRecieveResponse and connectionDidFinishLoading. The flow works fine as of now. I am facing a new problem which I couldn’t figure it out clearly.

Lets say I am having a button which will post the same URL.

  1. I am clicking button to post the url
  2. When the button is clcked again(within one/two sec), the URL is not
    posted (I have written logic).
  3. The URL is posted(For the fist button click) and I didn’t received
    any response till now, now I am trying to click the button again
    which will post the URL now.

My app getting exactly right here. Is it because I am using the _ReleaseObject(_urlConn); in the connectionDidFinishLoading method ????

  • 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-06-06T06:35:11+00:00Added an answer on June 6, 2026 at 6:35 am

    You need to be very careful when working with delegate callbacks.

    In this example, a single object is the delegate for two simultaneous NSURLConnection objects. This is a bad idea. Unless you develop a way of associating a specific connection with the appropriate response data object, you will end up mixing response data. In this case you make things worse for yourself by using _urlConn (an iVar i assume) instead of connection (the parameter passed to -connectionDidFinishLoading:).

    To simplify all of this, you need to either not make a new request when an existing request is pending, or you need to cancel the old request before you start a new request.

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

Sidebar

Related Questions

I am trying to post a multi-part form using httplib, url is hosted on
I am trying to filter/search a database with ajax $.ajax({ type: POST, url: filterSearch.php,
I'm trying to POST some multipart form data to my server using a Browser
I am trying to mock the server response for a POST request using Sinon.js.
I'm trying to post data on a server using java HttpUrlConnection class. It seems
I am trying to post data to my server (vb.net) using mobile devices. I've
i'm trying to make post to an external url using curl, the externa page
I am currently trying to add a variable to the url using Server.Transfer. I
I am trying to send a POST request to a server using AFNetworking, and
So i'm trying to POST something to a webserver. System.Net.HttpWebRequest EventReq = (System.Net.HttpWebRequest)System.Net.HttpWebRequest.Create(url); System.String

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.