All Verbs | /protoc/{Lang} |
---|
"use strict";
/** @typedef {'cpp'|'csharp'|'dart'|'java'|'java-lite'|'objc'|'php'|'python'|'ruby'|'go'|'js-closure'|'js-commonjs'|'js-node'|'swift'|'ts'|'ts-binary'} */
export var ProtocLang;
(function (ProtocLang) {
ProtocLang["Cpp"] = "cpp"
ProtocLang["CSharp"] = "csharp"
ProtocLang["Dart"] = "dart"
ProtocLang["Java"] = "java"
ProtocLang["JavaLite"] = "java-lite"
ProtocLang["ObjectiveC"] = "objc"
ProtocLang["Php"] = "php"
ProtocLang["Python"] = "python"
ProtocLang["Ruby"] = "ruby"
ProtocLang["Go"] = "go"
ProtocLang["JavaScriptClosure"] = "js-closure"
ProtocLang["JavaScriptCommonJs"] = "js-commonjs"
ProtocLang["JavaScriptNodeJs"] = "js-node"
ProtocLang["Swift"] = "swift"
ProtocLang["TypeScript"] = "ts"
ProtocLang["TypeScriptBinary"] = "ts-binary"
})(ProtocLang || (ProtocLang = {}));
export class ProtocResponse {
/** @param {{lang?:ProtocLang,generatedFiles?:{ [index: string]: string; },archiveUrl?:string,responseStatus?:ResponseStatus}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {ProtocLang} */
lang;
/** @type {{ [index: string]: string; }} */
generatedFiles;
/** @type {string} */
archiveUrl;
/** @type {ResponseStatus} */
responseStatus;
}
export class Protoc {
/** @param {{lang?:ProtocLang,files?:{ [index: string]: string; },protoUrl?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {ProtocLang} */
lang;
/** @type {{ [index: string]: string; }} */
files;
/** @type {string} */
protoUrl;
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /protoc/{Lang} HTTP/1.1
Host: grpc.servicestack.net
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{"lang":"cpp","files":{"String":"String"},"protoUrl":"String"}
HTTP/1.1 200 OK Content-Type: text/csv Content-Length: length {"lang":"cpp","generatedFiles":{"String":"String"},"archiveUrl":"String","responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}}