I am using Alamofire at my app and it returns a different response from what it should return (I've tested with Postman several times).
What I am doing is I simply call a webservice which returns a list of JSON objects. Here is the code if you want to take a look:
Alamofire.request(Constants.ENDPOINT_GET_PROF_CALENDAR, method: .get, parameters: params).responseJSON{
response in
if response.result.isSuccess{
let rawResult = JSON(response.result.value!)
self.parseResponse(json: rawResult)
}else{
print("Error getting appointments")
}
}
For example the response is like this:
{"busy": [
{
"type": "Busy",
"date": "2019-08-15",
"timeslot": "07:00-22:00",
"address": "No address",
"id": "41769"
}, //item 1
{
"type": "Busy",
"date": "2019-08-22",
"timeslot": "08:00-17:00",
"address": "αθήνα",
"id": "41670"
}, //item 2
.
.
.
}
If I make same request with postman it returns more items(A different response) than in Alamofire. What is going wrong?? It looks like Alamofire returns the same thing again and again. This is really weird to me and I would appreciate it if someone knows what is going on!