Stella
Stella

Reputation: 1868

Web service request formatting

I am developing an iOS app, where I need to request an url with email id. I have got the service api detail as below.

curl -X POST -c cookies.txt https://www.mysamplewebserver.com:6554/shareme/api/v1/user/password/forgot Request: {
"emailId": "[email protected]"
}

I don't get how to make this request. I should make it like that ->

https://www.mysamplewebserver.com:6554/shareme/api/v1/user/password/forgot/emailId=%@
or 
https://www.mysamplewebserver.com:6554/shareme/api/v1/user/password/forgot?emailId=%@

If anyone please help me getting a pseudo, so I can format the request according to that?

Thank you.

Upvotes: 0

Views: 24

Answers (1)

Jad Feitrouni
Jad Feitrouni

Reputation: 637

NSString *email = @"[email protected]";
NSString *url = [NSString stringWithFormat:@"https://www.mysamplewebserver.com:6554/shareme/api/v1/user/password/forgot/emailId=%@",email];

Hope that helps.

Upvotes: 1

Related Questions