Skip to content

Instantly share code, notes, and snippets.

View Bosn's full-sized avatar

Bosn Bosn

  • PingCAP
  • Peking, China
  • 09:11 (UTC +08:00)
View GitHub Profile
@Bosn
Bosn / URLSession POST.swift
Created May 13, 2020 08:05 — forked from dmathewwws/URLSession POST.swift
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