- XML GET
curl -H "Accept: application/xml" -H "Content-Type: application/xml" -X GET "http://hostname/resource"
- JSON GET
curl -i -H "Accept: application/json" -H "Content-Type: application/json" -X GET "http://hostname/resource"
- JSON PUT
curl -H "Accept: application/xml" -H "Content-Type: application/xml" -X GET "http://hostname/resource"
curl -i -H "Accept: application/json" -H "Content-Type: application/json" -X GET "http://hostname/resource"
// Copyright (c) 2014 Mark Grimes. All rights reserved. | |
import Foundation | |
class FakeUserDefaults : NSUserDefaults { | |
typealias FakeDefaults = Dictionary<String, AnyObject?> | |
var data : FakeDefaults | |
override init?(suiteName suitename: String) { |
// NSScanner+Swift.swift | |
// A set of Swift-idiomatic methods for NSScanner | |
// | |
// (c) 2015 Nate Cook, licensed under the MIT license | |
import Foundation | |
extension NSScanner { | |
// MARK: Strings |