Skip to content

Instantly share code, notes, and snippets.

View Bosn's full-sized avatar

Bosn Bosn

  • PingCAP
  • Peking, China
  • 10:58 (UTC +08:00)
View GitHub Profile
@dmathewwws
dmathewwws / URLSession POST.swift
Created November 5, 2016 01:35
URLSession POST request example
private static func createUserEventData(user:SKUser, eventType:SKEventType, sticker:Sticker?) {
// server endpoint
let endpoint = "https://app.stickerkit.io/userEvent/v1/\(user.projectID)"
guard let endpointUrl = URL(string: endpoint) else {
return nil
}
//Make JSON to send to send to server