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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T13:19:03+00:00 2026-05-23T13:19:03+00:00

I’m trying to use ASIFormDataRequest with the following code: NSURL *url = [NSURL URLWithString:

  • 0

I’m trying to use ASIFormDataRequest with the following code:

NSURL *url = [NSURL URLWithString: urlString];
ASIFormDataRequest *request = [ASIHTTPRequest requestWithURL:url];
[request addPostValue:@"json" forKey:@"json"];
[request setDelegate:self];
[request startAsynchronous];

The code keeps crashing at the [request addPostValue:@"json" forKey:@"json"]; line. I’ve also tried setPostValue:forKey: with the same result. If I comment out the addPostValue:forKey: line, the request goes through (I can see it on the server), but of course there is no json data.

I’ve simplified the problem down by passing in the string json for the value. That will actually be my json formatted string once I figure out this problem.

Here’s the stack trace:

2011-06-28 08:49:29.344 Gleek[26170:207] *** Terminating app due to uncaught     exception     'NSInvalidArgumentException', reason: '-[ASIHTTPRequest addPostValue:forKey:]: unrecognized     selector sent to instance 0x5024400'
*** Call stack at first throw:
(
0   CoreFoundation                      0x010f85a9 __exceptionPreprocess + 185
1   libobjc.A.dylib                     0x0124c313 objc_exception_throw + 44
2   CoreFoundation                      0x010fa0bb -[NSObject(NSObject) doesNotRecognizeSelector:] + 187
3   CoreFoundation                      0x01069966 ___forwarding___ + 966
4   CoreFoundation                      0x01069522 _CF_forwarding_prep_0 + 50
5   Gleek                               0x00006bab -[ProcedureDefDetailViewController toggleCompletedStatus:] + 1451
6   UIKit                               0x005e44fd -[UIApplication sendAction:to:from:forEvent:] + 119
7   UIKit                               0x00674799 -[UIControl sendAction:to:forEvent:] + 67
8   UIKit                               0x00676c2b -[UIControl(Internal) _sendActionsForEvents:withEvent:] + 527
9   UIKit                               0x006757d8 -[UIControl touchesEnded:withEvent:] + 458
10  UIKit                               0x00608ded -[UIWindow _sendTouchesForEvent:] + 567
11  UIKit                               0x005e9c37 -[UIApplication sendEvent:] + 447
12  UIKit                               0x005eef2e _UIApplicationHandleEvent + 7576
13  GraphicsServices                    0x018b6992 PurpleEventCallback + 1550
14  CoreFoundation                      0x010d9944 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 52
15  CoreFoundation                      0x01039cf7 __CFRunLoopDoSource1 + 215
16  CoreFoundation                      0x01036f83 __CFRunLoopRun + 979
17  CoreFoundation                      0x01036840 CFRunLoopRunSpecific + 208
18  CoreFoundation                      0x01036761 CFRunLoopRunInMode + 97
19  GraphicsServices                    0x018b51c4 GSEventRunModal + 217
20  GraphicsServices                    0x018b5289 GSEventRun + 115
21  UIKit                               0x005f2c93 UIApplicationMain + 1160
22  Gleek                               0x00002a09 main + 121
23  Gleek                               0x00002985 start + 53
24  ???                                 0x00000001 0x0 + 1
)

Thanks

  • 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-23T13:19:04+00:00Added an answer on May 23, 2026 at 1:19 pm

    The answer is simple, you have to use:

    ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:url];
    

    And you are using,

    ASIFormDataRequest *request = [ASIHTTPRequest requestWithURL:url];
    

    just change that, and it will work.

    Always make sure you are initializing your objects with the correct Class consturctor.

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

Sidebar

Related Questions

I am trying to understand how to use SyndicationItem to display feed which is
I'm trying to use string.replace('’','') to replace the dreaded weird single-quote character: ’ (aka
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want use html5's new tag to play a wav file (currently only supported
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out

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.