0

First I fire post request When user submit that form debugger area in inspect element shows the value of params. But How I will get that value in native ios Swift ?

Can any one have idea ?

Some what I know NSURLComponents used but I am confused how implement ?

Here I share images.

POST paramater seen Method

POST paramater seen Method0

Params field

Params field

What I require is how to get sid in native ios SDK swift.

I fired request using post method then I will get sid from param .

Adeel Miraj
  • 2,472
  • 3
  • 22
  • 32
Malay
  • 1
  • 2

1 Answers1

0

I would recommend to use Alamofire. This library makes it really easy to implement post requests in Swift. In your case this could somehow look like the following code:

let parameters:Parameters = [
       "sid": 1000
]

Alamofire.request("https://yoururl", parameters: parameters).responseString { response in
   print("Success: \(response.result.isSuccess)")
   print("Response String: \(response.result.value)")
}
Prine
  • 12,192
  • 8
  • 40
  • 59