Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

api with swift

guard let url = URL(string: "url here") else { return }

var request = URLRequest(url: url)
request.httpMethod = "METHOD HERE"
request.httpBody = Data()
URLSession.shared.dataTask(with: request) { data, response, error in
    if let error = error {
        print(error.localizedDescription)
    }
    guard let data = data else {
        return
    }
    if let jsonText = JSONSerialization.jsonObject(with: data) as? NSDictionary {
        print(jsonText)
    }
    
    if let jsonText = JSONSerialization.jsonObject(with: data) as? NSArray {
        print(jsonText)
    }
}
Comment

PREVIOUS NEXT
Code Example
Shell :: use rebase in git command 
Shell :: add ssh key to windows openssh client 
Shell :: bash float operations 
Shell :: how to do a pull request with one commit 
Shell :: Install DatadogRum 
Shell :: how to know if my linux is debian or fedora 
Shell :: Shell Script to Install Ansible AWX on centos 7 
Shell :: mac theme ubuntu terminal 
Shell :: install specific gitlab version on ubuntu 
Shell :: unable to load the service index for source https //www.myget.org/f/dotnet-core/api/v3/index.json 
Shell :: create-new-github-repo 
Shell :: xstate install 
Shell :: installing ipython-sql command line 
Shell :: cannot find lstdc++ ubuntu 
Shell :: wsl python image 
Shell :: firebase cli 
Shell :: mac bash_profile file not being sourced 
Shell :: bash find touch 
Shell :: setting Flask app variable 
Shell :: yacc install in kali linux 
Shell :: how to install simple screen recorder in fedora 
Shell :: git get remote branch 
Shell :: show output after a keyword in shell script in a file 
Shell :: create a bash script 
Shell :: cs50 cli50 install 
Shell :: apt download with dependencies 
Shell :: git clone 
Shell :: shell save variable 
Shell :: jq unencode string 
Shell :: bash array 
ADD CONTENT
Topic
Content
Source link
Name
8+4 =