ios - 'ASIHTTPRequest' is not responding to setPostValue, need to pass email id as parameter -


i new ios development , i'm working 'asihttprequest' library. have downloaded it's example here. it's working fine. need send parameter web service 'email' , authentication needed.

i tried following [request setpostvalue:@"abcd@gmail.com" forkey:@"email"]; based on reference

but it's give me warning instance method -setpostvalue:forkey() not found. how can pass email id parameter web service? reference use web service reset password when user forgot it.

edit :

now , need convert following code asiformdatarequest asihttprequest email id parameter , authentication. can me ? `

[self setrequest:[asihttprequest requestwithurl:[nsurl urlwithstring:@"http://abc.foo.com/api/forgot_password/"]]];     [request setusekeychainpersistence:[usekeychain ison]];  [request setdelegate:self]; [request setshouldpresentauthenticationdialog:[usebuiltindialog ison]]; [request setdidfinishselector:@selector(topsecretfetchcomplete:)]; [request setdidfailselector:@selector(topsecretfetchfailed:)]; [request startasynchronous]; 

`

that's because asihttprequest doesn't include -setpostvalue:forkey: method. asiformdatarequest, on other hand, does.

it sounds you're using pointer of type asihttprequest* send message instance of asiformdatarequest. that's okay if pointer points form data request, asiformdatarequest being subclass of asihttprequest, if you're sure enough type of object can send message specific it's type, know enough either use more specific type in first place or use type cast let compiler know doesn't need complain.


Comments

Popular posts from this blog

javascript - JS causing window size to be bigger than necessary - Dropdown bug -

php - Calling a template part from a post -

How to mention the localhost in android -