I have this CURL command from our custom REST API which comes without any other documentation except sample CURL calls.
As I need this in Swift, how can I start to get this translated and working in Swift?
I used SwiftyJSON so far (for playing around with other APIs), but I dont see how I can include the access token in there.
Sample call with CURL
curl -k -i -H "Accept: application/jsorization: Bearer
fbqgk5um9bei9newmitcjk8zqw12zw7b9" -X GET
'https://x43.herokuapp.com/x43/api/v1/sch?$aca=N'
Response
HTTP/1.1 200 OK
Server: Cowboy
Connection: keep-alive
X-Powered-By: Express
Content-Type: application/json; charset=utf-8
Date: Wed, 13 Jul 2016 15:05:28 GMT
Transfer-Encoding: chunked
Via: 1.1 vegur
Result in JSON
{"result":[{"sco_id":2,"sco_type":"LS","name":"Phoenix
English","city":"Perth","cou_id":"AU","environment":"R","image":"-
","rating":0},{"sco_id":3,"sco_type":"LS","name":"Milner
college","city":"Perth ","cou_id":"AU","environment":"L","image":"-
","rating":0},...
This is what you are looking for. I can see that you are beginner, so it would be really great, if you can spend some time to go though the basics of iOS App Development. Also, I recommend you to post question with some snippet in it, which you tried out.
Get start with
NSURLSession
, which will help you with Networking.