{"id":15037890,"url":"https://github.com/queeniecplusplus/ios_back_7","last_synced_at":"2026-03-15T08:27:23.655Z","repository":{"id":104588307,"uuid":"333613304","full_name":"QueenieCplusplus/iOS_Back_7","owner":"QueenieCplusplus","description":"post http data to remote server","archived":false,"fork":false,"pushed_at":"2021-01-28T01:56:15.000Z","size":477,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-13T13:13:46.898Z","etag":null,"topics":["ios11","ios14","post","postman","swift4","swift5","urlsession","urlsessiondatatask","xcode11","xcode12"],"latest_commit_sha":null,"homepage":"https://github.com/QueenieCplusplus/QuickGoThru/blob/master/README.md#apple-ios-swift-溫故愛鳳---計畫復甦","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/QueenieCplusplus.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-01-28T01:44:52.000Z","updated_at":"2021-01-28T01:56:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"a3b641e7-459e-4b1f-aaaf-420420295f0a","html_url":"https://github.com/QueenieCplusplus/iOS_Back_7","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QueenieCplusplus%2FiOS_Back_7","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QueenieCplusplus%2FiOS_Back_7/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QueenieCplusplus%2FiOS_Back_7/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QueenieCplusplus%2FiOS_Back_7/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/QueenieCplusplus","download_url":"https://codeload.github.com/QueenieCplusplus/iOS_Back_7/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243410445,"owners_count":20286395,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ios11","ios14","post","postman","swift4","swift5","urlsession","urlsessiondatatask","xcode11","xcode12"],"created_at":"2024-09-24T20:36:13.503Z","updated_at":"2025-12-26T08:59:44.652Z","avatar_url":"https://github.com/QueenieCplusplus.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# iOS_Back_7\npost http data to remote server using URLSessionDataTask\n\n\n1. code.\n\n\n        //\n        //  ViewController.swift\n        //  KatesPostmanApp\n        //\n        //  Created by KatesAndroid on 2021/1/28 AM 9: 30\n        //\n        // wanna post url like \"http://katesapp2019/ios.php?name=katespostmanapp\u0026date=20210128\"\n\n        // using URLSession\n\n        import UIKit\n\n        class ViewController: UIViewController {\n\n            override func viewDidLoad() {\n                super.viewDidLoad()\n\n                // TODO: URL\n                let url = URL(string: \"http://katesapp2019/ios.php\")\n                var req = URLRequest(url: url!, cachePolicy: .reloadIgnoringLocalAndRemoteCacheData, timeoutInterval: 30\n                )\n\n                // TODO: Request Data\n                req.httpMethod = \"POST\"\n                req.httpBody = \"name=katespostmanapp\u0026date=20210128\".data(using: .utf8)\n\n                // TODO: URLSession and its DownloadTask\n                let config = URLSessionConfiguration.default\n                let ss = URLSession(configuration: config)\n                _ = ss.dataTask(with: req){\n                    (data, res, err) in\n                    if let data = data {\n                        let htmlResData = String(data: data, encoding: .utf8)\n                        print(htmlResData!)\n                    }\n\n                }\n\n            }\n\n        }\n\n 2. iOS' hot key.\n \n    dot to shall default param for augment.\n    \n    ![](https://raw.githubusercontent.com/QueenieCplusplus/iOS_Back_7/main/dot.png)\n\n3. setup for Timeout Interval.\n\n    ![](https://raw.githubusercontent.com/QueenieCplusplus/iOS_Back_7/main/Timeout%20Interval.png)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqueeniecplusplus%2Fios_back_7","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fqueeniecplusplus%2Fios_back_7","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqueeniecplusplus%2Fios_back_7/lists"}