ios – Alamofire – Generic Community Name with Generic Response

[ad_1]

class ApiManager {
        let  url = "https://15f1-61-246-140-18.in.ngrok.io/Legal251AppAPI_IOS/api/lgapp/index.php?parameter=sendotp"
       static let sharedInstance = ApiManager()
        
        func callingApi(signUp : myModel){
        let headers: HTTPHeaders = [
            "Authkey": Secrets.AuthKey
    
        ]
            AF.request(url, methodology: .publish, parameters:signUp , encoder: JSONParameterEncoder.default, headers: headers).response{
                response in debugPrint(response)
            }
            
           
        }   
    }

My response

{
    "code": 200,
    "standing": "success",
    "message": "SMS IS SENT",
    "information": [
        {
            "status": 1,
            "number": "9999911144"
        }
    ]
}

My success response is coming in Information array

I tries to make the community class as generic however in that i’m not in a position to make generic parameter for publish the physique in api

I would like to attain the generic class for networking I explored so much however did not obtained upto the mark reply

I hope right here I’ll get

Thankyou Upfront

[ad_2]

Leave a Reply