Skip to content

kylef-archive/Requests

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Requests

Simple synchronous HTTP client in Swift.

Usage

let response = try get("http://httpbin.org/get")

print(response.headers)
print(response.body)
let response = try post("http://httpbin.org/post", content: "Hello World")

print(response.headers)
print(response.body)

Missing Features

I wouldn't recommend using this for anything serious, it misses many features. When considering the correct approach, this library probably takes a shortcut.

It misses at least the following:

  • HTTPS (SSL/TLS)
  • IPv6
  • Handling of redirects
  • Dozens of other things

Pull requests are however very welcome if you are interested in adding any of these missing features.

About

Simple synchronous HTTP client in Swift

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •