| All Verbs | /SignDocumentProxyContent/ |
|---|
import Foundation
import ServiceStack
public class SignDocumentProxyContent : Codable
{
public var clientKey:String
public var authorizationID:String
public var userSSN:String
public var documentContent:[UInt8] = []
required public init(){}
}
public class SignDocumentProxyContentResponse : BaseResponse
{
public var signedDocumentContent:[UInt8] = []
required public init(){ super.init() }
private enum CodingKeys : String, CodingKey {
case signedDocumentContent
}
required public init(from decoder: Decoder) throws {
try super.init(from: decoder)
let container = try decoder.container(keyedBy: CodingKeys.self)
signedDocumentContent = try container.decodeIfPresent([UInt8].self, forKey: .signedDocumentContent) ?? []
}
public override func encode(to encoder: Encoder) throws {
try super.encode(to: encoder)
var container = encoder.container(keyedBy: CodingKeys.self)
if signedDocumentContent.count > 0 { try container.encode(signedDocumentContent, forKey: .signedDocumentContent) }
}
}
public class BaseResponse : Codable
{
public var serviceSuccessResult:Bool
public var errorMesage:String
required public init(){}
}
Swift SignDocumentProxyContent DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /SignDocumentProxyContent/ HTTP/1.1
Host: imzagerservices.eyyubiye.bel.tr
Accept: application/json
Content-Type: application/json
Content-Length: length
{"ClientKey":"String","AuthorizationID":"String","UserSSN":"String","DocumentContent":"AA=="}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"SignedDocumentContent":"AA==","ServiceSuccessResult":false,"ErrorMesage":"String"}