3
0

Allow content-type header to specify the charset

This commit is contained in:
Tomaž Jerman
2022-01-17 09:21:29 +01:00
committed by Denis Arh
parent 2c873d269f
commit 4b113af9cc
32 changed files with 88 additions and 88 deletions
+1 -1
View File
@@ -218,7 +218,7 @@ func (r PermissionsUpdate) GetRules() rbac.RuleSet {
// Fill processes request and fills internal variables
func (r *PermissionsUpdate) Fill(req *http.Request) (err error) {
if strings.ToLower(req.Header.Get("content-type")) == "application/json" {
if strings.HasPrefix(strings.ToLower(req.Header.Get("content-type")), "application/json") {
err = json.NewDecoder(req.Body).Decode(r)
switch {
+1 -1
View File
@@ -457,7 +457,7 @@ func (r SessionResumeState) GetInput() *expr.Vars {
// Fill processes request and fills internal variables
func (r *SessionResumeState) Fill(req *http.Request) (err error) {
if strings.ToLower(req.Header.Get("content-type")) == "application/json" {
if strings.HasPrefix(strings.ToLower(req.Header.Get("content-type")), "application/json") {
err = json.NewDecoder(req.Body).Decode(r)
switch {
+2 -2
View File
@@ -468,7 +468,7 @@ func (r TriggerCreate) GetOwnedBy() uint64 {
// Fill processes request and fills internal variables
func (r *TriggerCreate) Fill(req *http.Request) (err error) {
if strings.ToLower(req.Header.Get("content-type")) == "application/json" {
if strings.HasPrefix(strings.ToLower(req.Header.Get("content-type")), "application/json") {
err = json.NewDecoder(req.Body).Decode(r)
switch {
@@ -759,7 +759,7 @@ func (r TriggerUpdate) GetOwnedBy() uint64 {
// Fill processes request and fills internal variables
func (r *TriggerUpdate) Fill(req *http.Request) (err error) {
if strings.ToLower(req.Header.Get("content-type")) == "application/json" {
if strings.HasPrefix(strings.ToLower(req.Header.Get("content-type")), "application/json") {
err = json.NewDecoder(req.Body).Decode(r)
switch {
+4 -4
View File
@@ -477,7 +477,7 @@ func (r WorkflowCreate) GetOwnedBy() uint64 {
// Fill processes request and fills internal variables
func (r *WorkflowCreate) Fill(req *http.Request) (err error) {
if strings.ToLower(req.Header.Get("content-type")) == "application/json" {
if strings.HasPrefix(strings.ToLower(req.Header.Get("content-type")), "application/json") {
err = json.NewDecoder(req.Body).Decode(r)
switch {
@@ -798,7 +798,7 @@ func (r WorkflowUpdate) GetOwnedBy() uint64 {
// Fill processes request and fills internal variables
func (r *WorkflowUpdate) Fill(req *http.Request) (err error) {
if strings.ToLower(req.Header.Get("content-type")) == "application/json" {
if strings.HasPrefix(strings.ToLower(req.Header.Get("content-type")), "application/json") {
err = json.NewDecoder(req.Body).Decode(r)
switch {
@@ -1182,7 +1182,7 @@ func (r WorkflowTest) GetRunAs() bool {
// Fill processes request and fills internal variables
func (r *WorkflowTest) Fill(req *http.Request) (err error) {
if strings.ToLower(req.Header.Get("content-type")) == "application/json" {
if strings.HasPrefix(strings.ToLower(req.Header.Get("content-type")), "application/json") {
err = json.NewDecoder(req.Body).Decode(r)
switch {
@@ -1313,7 +1313,7 @@ func (r WorkflowExec) GetAsync() bool {
// Fill processes request and fills internal variables
func (r *WorkflowExec) Fill(req *http.Request) (err error) {
if strings.ToLower(req.Header.Get("content-type")) == "application/json" {
if strings.HasPrefix(strings.ToLower(req.Header.Get("content-type")), "application/json") {
err = json.NewDecoder(req.Body).Decode(r)
switch {
+1 -1
View File
@@ -290,7 +290,7 @@ func (r AutomationTriggerScript) GetArgs() map[string]interface{} {
// Fill processes request and fills internal variables
func (r *AutomationTriggerScript) Fill(req *http.Request) (err error) {
if strings.ToLower(req.Header.Get("content-type")) == "application/json" {
if strings.HasPrefix(strings.ToLower(req.Header.Get("content-type")), "application/json") {
err = json.NewDecoder(req.Body).Decode(r)
switch {
+2 -2
View File
@@ -324,7 +324,7 @@ func (r ChartCreate) GetLabels() map[string]string {
// Fill processes request and fills internal variables
func (r *ChartCreate) Fill(req *http.Request) (err error) {
if strings.ToLower(req.Header.Get("content-type")) == "application/json" {
if strings.HasPrefix(strings.ToLower(req.Header.Get("content-type")), "application/json") {
err = json.NewDecoder(req.Body).Decode(r)
switch {
@@ -536,7 +536,7 @@ func (r ChartUpdate) GetUpdatedAt() *time.Time {
// Fill processes request and fills internal variables
func (r *ChartUpdate) Fill(req *http.Request) (err error) {
if strings.ToLower(req.Header.Get("content-type")) == "application/json" {
if strings.HasPrefix(strings.ToLower(req.Header.Get("content-type")), "application/json") {
err = json.NewDecoder(req.Body).Decode(r)
switch {
+4 -4
View File
@@ -410,7 +410,7 @@ func (r ModuleCreate) GetLabels() map[string]string {
// Fill processes request and fills internal variables
func (r *ModuleCreate) Fill(req *http.Request) (err error) {
if strings.ToLower(req.Header.Get("content-type")) == "application/json" {
if strings.HasPrefix(strings.ToLower(req.Header.Get("content-type")), "application/json") {
err = json.NewDecoder(req.Body).Decode(r)
switch {
@@ -635,7 +635,7 @@ func (r ModuleUpdate) GetLabels() map[string]string {
// Fill processes request and fills internal variables
func (r *ModuleUpdate) Fill(req *http.Request) (err error) {
if strings.ToLower(req.Header.Get("content-type")) == "application/json" {
if strings.HasPrefix(strings.ToLower(req.Header.Get("content-type")), "application/json") {
err = json.NewDecoder(req.Body).Decode(r)
switch {
@@ -856,7 +856,7 @@ func (r ModuleTriggerScript) GetArgs() map[string]interface{} {
// Fill processes request and fills internal variables
func (r *ModuleTriggerScript) Fill(req *http.Request) (err error) {
if strings.ToLower(req.Header.Get("content-type")) == "application/json" {
if strings.HasPrefix(strings.ToLower(req.Header.Get("content-type")), "application/json") {
err = json.NewDecoder(req.Body).Decode(r)
switch {
@@ -1022,7 +1022,7 @@ func (r ModuleUpdateTranslations) GetTranslations() locale.ResourceTranslationSe
// Fill processes request and fills internal variables
func (r *ModuleUpdateTranslations) Fill(req *http.Request) (err error) {
if strings.ToLower(req.Header.Get("content-type")) == "application/json" {
if strings.HasPrefix(strings.ToLower(req.Header.Get("content-type")), "application/json") {
err = json.NewDecoder(req.Body).Decode(r)
switch {
+8 -8
View File
@@ -393,7 +393,7 @@ func (r NamespaceCreate) GetMeta() sqlxTypes.JSONText {
// Fill processes request and fills internal variables
func (r *NamespaceCreate) Fill(req *http.Request) (err error) {
if strings.ToLower(req.Header.Get("content-type")) == "application/json" {
if strings.HasPrefix(strings.ToLower(req.Header.Get("content-type")), "application/json") {
err = json.NewDecoder(req.Body).Decode(r)
switch {
@@ -595,7 +595,7 @@ func (r NamespaceUpdate) GetUpdatedAt() *time.Time {
// Fill processes request and fills internal variables
func (r *NamespaceUpdate) Fill(req *http.Request) (err error) {
if strings.ToLower(req.Header.Get("content-type")) == "application/json" {
if strings.HasPrefix(strings.ToLower(req.Header.Get("content-type")), "application/json") {
err = json.NewDecoder(req.Body).Decode(r)
switch {
@@ -787,7 +787,7 @@ func (r NamespaceUpload) GetUpload() *multipart.FileHeader {
// Fill processes request and fills internal variables
func (r *NamespaceUpload) Fill(req *http.Request) (err error) {
if strings.ToLower(req.Header.Get("content-type")) == "application/json" {
if strings.HasPrefix(strings.ToLower(req.Header.Get("content-type")), "application/json") {
err = json.NewDecoder(req.Body).Decode(r)
switch {
@@ -857,7 +857,7 @@ func (r NamespaceClone) GetSlug() string {
// Fill processes request and fills internal variables
func (r *NamespaceClone) Fill(req *http.Request) (err error) {
if strings.ToLower(req.Header.Get("content-type")) == "application/json" {
if strings.HasPrefix(strings.ToLower(req.Header.Get("content-type")), "application/json") {
err = json.NewDecoder(req.Body).Decode(r)
switch {
@@ -1007,7 +1007,7 @@ func (r NamespaceImportInit) GetUpload() *multipart.FileHeader {
// Fill processes request and fills internal variables
func (r *NamespaceImportInit) Fill(req *http.Request) (err error) {
if strings.ToLower(req.Header.Get("content-type")) == "application/json" {
if strings.HasPrefix(strings.ToLower(req.Header.Get("content-type")), "application/json") {
err = json.NewDecoder(req.Body).Decode(r)
switch {
@@ -1077,7 +1077,7 @@ func (r NamespaceImportRun) GetSlug() string {
// Fill processes request and fills internal variables
func (r *NamespaceImportRun) Fill(req *http.Request) (err error) {
if strings.ToLower(req.Header.Get("content-type")) == "application/json" {
if strings.HasPrefix(strings.ToLower(req.Header.Get("content-type")), "application/json") {
err = json.NewDecoder(req.Body).Decode(r)
switch {
@@ -1180,7 +1180,7 @@ func (r NamespaceTriggerScript) GetArgs() map[string]interface{} {
// Fill processes request and fills internal variables
func (r *NamespaceTriggerScript) Fill(req *http.Request) (err error) {
if strings.ToLower(req.Header.Get("content-type")) == "application/json" {
if strings.HasPrefix(strings.ToLower(req.Header.Get("content-type")), "application/json") {
err = json.NewDecoder(req.Body).Decode(r)
switch {
@@ -1322,7 +1322,7 @@ func (r NamespaceUpdateTranslations) GetTranslations() locale.ResourceTranslatio
// Fill processes request and fills internal variables
func (r *NamespaceUpdateTranslations) Fill(req *http.Request) (err error) {
if strings.ToLower(req.Header.Get("content-type")) == "application/json" {
if strings.HasPrefix(strings.ToLower(req.Header.Get("content-type")), "application/json") {
err = json.NewDecoder(req.Body).Decode(r)
switch {
+1 -1
View File
@@ -117,7 +117,7 @@ func (r NotificationEmailSend) GetRemoteAttachments() []string {
// Fill processes request and fills internal variables
func (r *NotificationEmailSend) Fill(req *http.Request) (err error) {
if strings.ToLower(req.Header.Get("content-type")) == "application/json" {
if strings.HasPrefix(strings.ToLower(req.Header.Get("content-type")), "application/json") {
err = json.NewDecoder(req.Body).Decode(r)
switch {
+6 -6
View File
@@ -525,7 +525,7 @@ func (r PageCreate) GetBlocks() sqlxTypes.JSONText {
// Fill processes request and fills internal variables
func (r *PageCreate) Fill(req *http.Request) (err error) {
if strings.ToLower(req.Header.Get("content-type")) == "application/json" {
if strings.HasPrefix(strings.ToLower(req.Header.Get("content-type")), "application/json") {
err = json.NewDecoder(req.Body).Decode(r)
switch {
@@ -866,7 +866,7 @@ func (r PageUpdate) GetBlocks() sqlxTypes.JSONText {
// Fill processes request and fills internal variables
func (r *PageUpdate) Fill(req *http.Request) (err error) {
if strings.ToLower(req.Header.Get("content-type")) == "application/json" {
if strings.HasPrefix(strings.ToLower(req.Header.Get("content-type")), "application/json") {
err = json.NewDecoder(req.Body).Decode(r)
switch {
@@ -1083,7 +1083,7 @@ func (r PageReorder) GetPageIDs() []string {
// Fill processes request and fills internal variables
func (r *PageReorder) Fill(req *http.Request) (err error) {
if strings.ToLower(req.Header.Get("content-type")) == "application/json" {
if strings.HasPrefix(strings.ToLower(req.Header.Get("content-type")), "application/json") {
err = json.NewDecoder(req.Body).Decode(r)
switch {
@@ -1219,7 +1219,7 @@ func (r PageUpload) GetUpload() *multipart.FileHeader {
// Fill processes request and fills internal variables
func (r *PageUpload) Fill(req *http.Request) (err error) {
if strings.ToLower(req.Header.Get("content-type")) == "application/json" {
if strings.HasPrefix(strings.ToLower(req.Header.Get("content-type")), "application/json") {
err = json.NewDecoder(req.Body).Decode(r)
switch {
@@ -1313,7 +1313,7 @@ func (r PageTriggerScript) GetArgs() map[string]interface{} {
// Fill processes request and fills internal variables
func (r *PageTriggerScript) Fill(req *http.Request) (err error) {
if strings.ToLower(req.Header.Get("content-type")) == "application/json" {
if strings.HasPrefix(strings.ToLower(req.Header.Get("content-type")), "application/json") {
err = json.NewDecoder(req.Body).Decode(r)
switch {
@@ -1479,7 +1479,7 @@ func (r PageUpdateTranslations) GetTranslations() locale.ResourceTranslationSet
// Fill processes request and fills internal variables
func (r *PageUpdateTranslations) Fill(req *http.Request) (err error) {
if strings.ToLower(req.Header.Get("content-type")) == "application/json" {
if strings.HasPrefix(strings.ToLower(req.Header.Get("content-type")), "application/json") {
err = json.NewDecoder(req.Body).Decode(r)
switch {
+1 -1
View File
@@ -218,7 +218,7 @@ func (r PermissionsUpdate) GetRules() rbac.RuleSet {
// Fill processes request and fills internal variables
func (r *PermissionsUpdate) Fill(req *http.Request) (err error) {
if strings.ToLower(req.Header.Get("content-type")) == "application/json" {
if strings.HasPrefix(strings.ToLower(req.Header.Get("content-type")), "application/json") {
err = json.NewDecoder(req.Body).Decode(r)
switch {
+9 -9
View File
@@ -701,7 +701,7 @@ func (r RecordImportInit) GetUpload() *multipart.FileHeader {
// Fill processes request and fills internal variables
func (r *RecordImportInit) Fill(req *http.Request) (err error) {
if strings.ToLower(req.Header.Get("content-type")) == "application/json" {
if strings.HasPrefix(strings.ToLower(req.Header.Get("content-type")), "application/json") {
err = json.NewDecoder(req.Body).Decode(r)
switch {
@@ -801,7 +801,7 @@ func (r RecordImportRun) GetOnError() string {
// Fill processes request and fills internal variables
func (r *RecordImportRun) Fill(req *http.Request) (err error) {
if strings.ToLower(req.Header.Get("content-type")) == "application/json" {
if strings.HasPrefix(strings.ToLower(req.Header.Get("content-type")), "application/json") {
err = json.NewDecoder(req.Body).Decode(r)
switch {
@@ -1099,7 +1099,7 @@ func (r RecordExec) GetArgs() []ProcedureArg {
// Fill processes request and fills internal variables
func (r *RecordExec) Fill(req *http.Request) (err error) {
if strings.ToLower(req.Header.Get("content-type")) == "application/json" {
if strings.HasPrefix(strings.ToLower(req.Header.Get("content-type")), "application/json") {
err = json.NewDecoder(req.Body).Decode(r)
switch {
@@ -1206,7 +1206,7 @@ func (r RecordCreate) GetLabels() map[string]string {
// Fill processes request and fills internal variables
func (r *RecordCreate) Fill(req *http.Request) (err error) {
if strings.ToLower(req.Header.Get("content-type")) == "application/json" {
if strings.HasPrefix(strings.ToLower(req.Header.Get("content-type")), "application/json") {
err = json.NewDecoder(req.Body).Decode(r)
switch {
@@ -1402,7 +1402,7 @@ func (r RecordUpdate) GetLabels() map[string]string {
// Fill processes request and fills internal variables
func (r *RecordUpdate) Fill(req *http.Request) (err error) {
if strings.ToLower(req.Header.Get("content-type")) == "application/json" {
if strings.HasPrefix(strings.ToLower(req.Header.Get("content-type")), "application/json") {
err = json.NewDecoder(req.Body).Decode(r)
switch {
@@ -1533,7 +1533,7 @@ func (r RecordBulkDelete) GetTruncate() bool {
// Fill processes request and fills internal variables
func (r *RecordBulkDelete) Fill(req *http.Request) (err error) {
if strings.ToLower(req.Header.Get("content-type")) == "application/json" {
if strings.HasPrefix(strings.ToLower(req.Header.Get("content-type")), "application/json") {
err = json.NewDecoder(req.Body).Decode(r)
switch {
@@ -1706,7 +1706,7 @@ func (r RecordUpload) GetUpload() *multipart.FileHeader {
// Fill processes request and fills internal variables
func (r *RecordUpload) Fill(req *http.Request) (err error) {
if strings.ToLower(req.Header.Get("content-type")) == "application/json" {
if strings.HasPrefix(strings.ToLower(req.Header.Get("content-type")), "application/json") {
err = json.NewDecoder(req.Body).Decode(r)
switch {
@@ -1834,7 +1834,7 @@ func (r RecordTriggerScript) GetValues() types.RecordValueSet {
// Fill processes request and fills internal variables
func (r *RecordTriggerScript) Fill(req *http.Request) (err error) {
if strings.ToLower(req.Header.Get("content-type")) == "application/json" {
if strings.HasPrefix(strings.ToLower(req.Header.Get("content-type")), "application/json") {
err = json.NewDecoder(req.Body).Decode(r)
switch {
@@ -1949,7 +1949,7 @@ func (r RecordTriggerScriptOnList) GetArgs() map[string]interface{} {
// Fill processes request and fills internal variables
func (r *RecordTriggerScriptOnList) Fill(req *http.Request) (err error) {
if strings.ToLower(req.Header.Get("content-type")) == "application/json" {
if strings.HasPrefix(strings.ToLower(req.Header.Get("content-type")), "application/json") {
err = json.NewDecoder(req.Body).Decode(r)
switch {
+3 -3
View File
@@ -303,7 +303,7 @@ func (r ManageStructureCreateExposed) GetFields() types.ModuleFieldSet {
// Fill processes request and fills internal variables
func (r *ManageStructureCreateExposed) Fill(req *http.Request) (err error) {
if strings.ToLower(req.Header.Get("content-type")) == "application/json" {
if strings.HasPrefix(strings.ToLower(req.Header.Get("content-type")), "application/json") {
err = json.NewDecoder(req.Body).Decode(r)
switch {
@@ -466,7 +466,7 @@ func (r ManageStructureUpdateExposed) GetFields() types.ModuleFieldSet {
// Fill processes request and fills internal variables
func (r *ManageStructureUpdateExposed) Fill(req *http.Request) (err error) {
if strings.ToLower(req.Header.Get("content-type")) == "application/json" {
if strings.HasPrefix(strings.ToLower(req.Header.Get("content-type")), "application/json") {
err = json.NewDecoder(req.Body).Decode(r)
switch {
@@ -717,7 +717,7 @@ func (r ManageStructureCreateMappings) GetFields() types.ModuleFieldMappingSet {
// Fill processes request and fills internal variables
func (r *ManageStructureCreateMappings) Fill(req *http.Request) (err error) {
if strings.ToLower(req.Header.Get("content-type")) == "application/json" {
if strings.HasPrefix(strings.ToLower(req.Header.Get("content-type")), "application/json") {
err = json.NewDecoder(req.Body).Decode(r)
switch {
+3 -3
View File
@@ -229,7 +229,7 @@ func (r NodeCreate) GetPairingURI() string {
// Fill processes request and fills internal variables
func (r *NodeCreate) Fill(req *http.Request) (err error) {
if strings.ToLower(req.Header.Get("content-type")) == "application/json" {
if strings.HasPrefix(strings.ToLower(req.Header.Get("content-type")), "application/json") {
err = json.NewDecoder(req.Body).Decode(r)
switch {
@@ -424,7 +424,7 @@ func (r NodeUpdate) GetBaseURL() string {
// Fill processes request and fills internal variables
func (r *NodeUpdate) Fill(req *http.Request) (err error) {
if strings.ToLower(req.Header.Get("content-type")) == "application/json" {
if strings.HasPrefix(strings.ToLower(req.Header.Get("content-type")), "application/json") {
err = json.NewDecoder(req.Body).Decode(r)
switch {
@@ -675,7 +675,7 @@ func (r NodeHandshakeComplete) GetAuthToken() string {
// Fill processes request and fills internal variables
func (r *NodeHandshakeComplete) Fill(req *http.Request) (err error) {
if strings.ToLower(req.Header.Get("content-type")) == "application/json" {
if strings.HasPrefix(strings.ToLower(req.Header.Get("content-type")), "application/json") {
err = json.NewDecoder(req.Body).Decode(r)
switch {
+1 -1
View File
@@ -94,7 +94,7 @@ func (r NodeHandshakeInitialize) GetAuthToken() string {
// Fill processes request and fills internal variables
func (r *NodeHandshakeInitialize) Fill(req *http.Request) (err error) {
if strings.ToLower(req.Header.Get("content-type")) == "application/json" {
if strings.HasPrefix(strings.ToLower(req.Header.Get("content-type")), "application/json") {
err = json.NewDecoder(req.Body).Decode(r)
switch {
+1 -1
View File
@@ -218,7 +218,7 @@ func (r PermissionsUpdate) GetRules() rbac.RuleSet {
// Fill processes request and fills internal variables
func (r *PermissionsUpdate) Fill(req *http.Request) (err error) {
if strings.ToLower(req.Header.Get("content-type")) == "application/json" {
if strings.HasPrefix(strings.ToLower(req.Header.Get("content-type")), "application/json") {
err = json.NewDecoder(req.Body).Decode(r)
switch {
+1 -1
View File
@@ -77,7 +77,7 @@ func (r {{ export $.Endpoint.Entrypoint $a.Name }}) Get{{ export $p.Name }}() {{
// Fill processes request and fills internal variables
func (r *{{ export $.Endpoint.Entrypoint $a.Name }}) Fill(req *http.Request) (err error) {
{{ if $a.Params.Post }}
if strings.ToLower(req.Header.Get("content-type")) == "application/json" {
if strings.HasPrefix(strings.ToLower(req.Header.Get("content-type")), "application/json") {
err = json.NewDecoder(req.Body).Decode(r)
switch {
+2 -2
View File
@@ -312,7 +312,7 @@ func (r ApigwFilterCreate) GetParams() types.ApigwFilterParams {
// Fill processes request and fills internal variables
func (r *ApigwFilterCreate) Fill(req *http.Request) (err error) {
if strings.ToLower(req.Header.Get("content-type")) == "application/json" {
if strings.HasPrefix(strings.ToLower(req.Header.Get("content-type")), "application/json") {
err = json.NewDecoder(req.Body).Decode(r)
switch {
@@ -493,7 +493,7 @@ func (r ApigwFilterUpdate) GetParams() types.ApigwFilterParams {
// Fill processes request and fills internal variables
func (r *ApigwFilterUpdate) Fill(req *http.Request) (err error) {
if strings.ToLower(req.Header.Get("content-type")) == "application/json" {
if strings.HasPrefix(strings.ToLower(req.Header.Get("content-type")), "application/json") {
err = json.NewDecoder(req.Body).Decode(r)
switch {
+2 -2
View File
@@ -331,7 +331,7 @@ func (r ApigwRouteCreate) GetMeta() types.ApigwRouteMeta {
// Fill processes request and fills internal variables
func (r *ApigwRouteCreate) Fill(req *http.Request) (err error) {
if strings.ToLower(req.Header.Get("content-type")) == "application/json" {
if strings.HasPrefix(strings.ToLower(req.Header.Get("content-type")), "application/json") {
err = json.NewDecoder(req.Body).Decode(r)
switch {
@@ -492,7 +492,7 @@ func (r ApigwRouteUpdate) GetMeta() types.ApigwRouteMeta {
// Fill processes request and fills internal variables
func (r *ApigwRouteUpdate) Fill(req *http.Request) (err error) {
if strings.ToLower(req.Header.Get("content-type")) == "application/json" {
if strings.HasPrefix(strings.ToLower(req.Header.Get("content-type")), "application/json") {
err = json.NewDecoder(req.Body).Decode(r)
switch {
+5 -5
View File
@@ -434,7 +434,7 @@ func (r ApplicationCreate) GetLabels() map[string]string {
// Fill processes request and fills internal variables
func (r *ApplicationCreate) Fill(req *http.Request) (err error) {
if strings.ToLower(req.Header.Get("content-type")) == "application/json" {
if strings.HasPrefix(strings.ToLower(req.Header.Get("content-type")), "application/json") {
err = json.NewDecoder(req.Body).Decode(r)
switch {
@@ -615,7 +615,7 @@ func (r ApplicationUpdate) GetLabels() map[string]string {
// Fill processes request and fills internal variables
func (r *ApplicationUpdate) Fill(req *http.Request) (err error) {
if strings.ToLower(req.Header.Get("content-type")) == "application/json" {
if strings.HasPrefix(strings.ToLower(req.Header.Get("content-type")), "application/json") {
err = json.NewDecoder(req.Body).Decode(r)
switch {
@@ -772,7 +772,7 @@ func (r ApplicationUpload) GetUpload() *multipart.FileHeader {
// Fill processes request and fills internal variables
func (r *ApplicationUpload) Fill(req *http.Request) (err error) {
if strings.ToLower(req.Header.Get("content-type")) == "application/json" {
if strings.HasPrefix(strings.ToLower(req.Header.Get("content-type")), "application/json") {
err = json.NewDecoder(req.Body).Decode(r)
switch {
@@ -1083,7 +1083,7 @@ func (r ApplicationTriggerScript) GetArgs() map[string]interface{} {
// Fill processes request and fills internal variables
func (r *ApplicationTriggerScript) Fill(req *http.Request) (err error) {
if strings.ToLower(req.Header.Get("content-type")) == "application/json" {
if strings.HasPrefix(strings.ToLower(req.Header.Get("content-type")), "application/json") {
err = json.NewDecoder(req.Body).Decode(r)
switch {
@@ -1184,7 +1184,7 @@ func (r ApplicationReorder) GetApplicationIDs() []string {
// Fill processes request and fills internal variables
func (r *ApplicationReorder) Fill(req *http.Request) (err error) {
if strings.ToLower(req.Header.Get("content-type")) == "application/json" {
if strings.HasPrefix(strings.ToLower(req.Header.Get("content-type")), "application/json") {
err = json.NewDecoder(req.Body).Decode(r)
switch {
+1 -1
View File
@@ -61,7 +61,7 @@ func (r AuthImpersonate) GetUserID() uint64 {
// Fill processes request and fills internal variables
func (r *AuthImpersonate) Fill(req *http.Request) (err error) {
if strings.ToLower(req.Header.Get("content-type")) == "application/json" {
if strings.HasPrefix(strings.ToLower(req.Header.Get("content-type")), "application/json") {
err = json.NewDecoder(req.Body).Decode(r)
switch {
+2 -2
View File
@@ -403,7 +403,7 @@ func (r AuthClientCreate) GetLabels() map[string]string {
// Fill processes request and fills internal variables
func (r *AuthClientCreate) Fill(req *http.Request) (err error) {
if strings.ToLower(req.Header.Get("content-type")) == "application/json" {
if strings.HasPrefix(strings.ToLower(req.Header.Get("content-type")), "application/json") {
err = json.NewDecoder(req.Body).Decode(r)
switch {
@@ -704,7 +704,7 @@ func (r AuthClientUpdate) GetLabels() map[string]string {
// Fill processes request and fills internal variables
func (r *AuthClientUpdate) Fill(req *http.Request) (err error) {
if strings.ToLower(req.Header.Get("content-type")) == "application/json" {
if strings.HasPrefix(strings.ToLower(req.Header.Get("content-type")), "application/json") {
err = json.NewDecoder(req.Body).Decode(r)
switch {
+1 -1
View File
@@ -290,7 +290,7 @@ func (r AutomationTriggerScript) GetArgs() map[string]interface{} {
// Fill processes request and fills internal variables
func (r *AutomationTriggerScript) Fill(req *http.Request) (err error) {
if strings.ToLower(req.Header.Get("content-type")) == "application/json" {
if strings.HasPrefix(strings.ToLower(req.Header.Get("content-type")), "application/json") {
err = json.NewDecoder(req.Body).Decode(r)
switch {
+2 -2
View File
@@ -350,7 +350,7 @@ func (r LocaleCreateResource) GetOwnerID() uint64 {
// Fill processes request and fills internal variables
func (r *LocaleCreateResource) Fill(req *http.Request) (err error) {
if strings.ToLower(req.Header.Get("content-type")) == "application/json" {
if strings.HasPrefix(strings.ToLower(req.Header.Get("content-type")), "application/json") {
err = json.NewDecoder(req.Body).Decode(r)
switch {
@@ -521,7 +521,7 @@ func (r LocaleUpdateResource) GetOwnerID() uint64 {
// Fill processes request and fills internal variables
func (r *LocaleUpdateResource) Fill(req *http.Request) (err error) {
if strings.ToLower(req.Header.Get("content-type")) == "application/json" {
if strings.HasPrefix(strings.ToLower(req.Header.Get("content-type")), "application/json") {
err = json.NewDecoder(req.Body).Decode(r)
switch {
+1 -1
View File
@@ -230,7 +230,7 @@ func (r PermissionsUpdate) GetRules() rbac.RuleSet {
// Fill processes request and fills internal variables
func (r *PermissionsUpdate) Fill(req *http.Request) (err error) {
if strings.ToLower(req.Header.Get("content-type")) == "application/json" {
if strings.HasPrefix(strings.ToLower(req.Header.Get("content-type")), "application/json") {
err = json.NewDecoder(req.Body).Decode(r)
switch {
+2 -2
View File
@@ -237,7 +237,7 @@ func (r QueuesCreate) GetMeta() types.QueueMeta {
// Fill processes request and fills internal variables
func (r *QueuesCreate) Fill(req *http.Request) (err error) {
if strings.ToLower(req.Header.Get("content-type")) == "application/json" {
if strings.HasPrefix(strings.ToLower(req.Header.Get("content-type")), "application/json") {
err = json.NewDecoder(req.Body).Decode(r)
switch {
@@ -393,7 +393,7 @@ func (r QueuesUpdate) GetMeta() types.QueueMeta {
// Fill processes request and fills internal variables
func (r *QueuesUpdate) Fill(req *http.Request) (err error) {
if strings.ToLower(req.Header.Get("content-type")) == "application/json" {
if strings.HasPrefix(strings.ToLower(req.Header.Get("content-type")), "application/json") {
err = json.NewDecoder(req.Body).Decode(r)
switch {
+3 -3
View File
@@ -373,7 +373,7 @@ func (r ReminderCreate) GetRemindAt() *time.Time {
// Fill processes request and fills internal variables
func (r *ReminderCreate) Fill(req *http.Request) (err error) {
if strings.ToLower(req.Header.Get("content-type")) == "application/json" {
if strings.HasPrefix(strings.ToLower(req.Header.Get("content-type")), "application/json") {
err = json.NewDecoder(req.Body).Decode(r)
switch {
@@ -504,7 +504,7 @@ func (r ReminderUpdate) GetRemindAt() *time.Time {
// Fill processes request and fills internal variables
func (r *ReminderUpdate) Fill(req *http.Request) (err error) {
if strings.ToLower(req.Header.Get("content-type")) == "application/json" {
if strings.HasPrefix(strings.ToLower(req.Header.Get("content-type")), "application/json") {
err = json.NewDecoder(req.Body).Decode(r)
switch {
@@ -734,7 +734,7 @@ func (r ReminderSnooze) GetRemindAt() *time.Time {
// Fill processes request and fills internal variables
func (r *ReminderSnooze) Fill(req *http.Request) (err error) {
if strings.ToLower(req.Header.Get("content-type")) == "application/json" {
if strings.HasPrefix(strings.ToLower(req.Header.Get("content-type")), "application/json") {
err = json.NewDecoder(req.Body).Decode(r)
switch {
+4 -4
View File
@@ -338,7 +338,7 @@ func (r ReportCreate) GetLabels() map[string]string {
// Fill processes request and fills internal variables
func (r *ReportCreate) Fill(req *http.Request) (err error) {
if strings.ToLower(req.Header.Get("content-type")) == "application/json" {
if strings.HasPrefix(strings.ToLower(req.Header.Get("content-type")), "application/json") {
err = json.NewDecoder(req.Body).Decode(r)
switch {
@@ -508,7 +508,7 @@ func (r ReportUpdate) GetLabels() map[string]string {
// Fill processes request and fills internal variables
func (r *ReportUpdate) Fill(req *http.Request) (err error) {
if strings.ToLower(req.Header.Get("content-type")) == "application/json" {
if strings.HasPrefix(strings.ToLower(req.Header.Get("content-type")), "application/json") {
err = json.NewDecoder(req.Body).Decode(r)
switch {
@@ -771,7 +771,7 @@ func (r ReportDescribe) GetDescribe() []string {
// Fill processes request and fills internal variables
func (r *ReportDescribe) Fill(req *http.Request) (err error) {
if strings.ToLower(req.Header.Get("content-type")) == "application/json" {
if strings.HasPrefix(strings.ToLower(req.Header.Get("content-type")), "application/json") {
err = json.NewDecoder(req.Body).Decode(r)
switch {
@@ -850,7 +850,7 @@ func (r ReportRun) GetFrames() report.FrameDefinitionSet {
// Fill processes request and fills internal variables
func (r *ReportRun) Fill(req *http.Request) (err error) {
if strings.ToLower(req.Header.Get("content-type")) == "application/json" {
if strings.HasPrefix(strings.ToLower(req.Header.Get("content-type")), "application/json") {
err = json.NewDecoder(req.Body).Decode(r)
switch {
+5 -5
View File
@@ -412,7 +412,7 @@ func (r RoleCreate) GetLabels() map[string]string {
// Fill processes request and fills internal variables
func (r *RoleCreate) Fill(req *http.Request) (err error) {
if strings.ToLower(req.Header.Get("content-type")) == "application/json" {
if strings.HasPrefix(strings.ToLower(req.Header.Get("content-type")), "application/json") {
err = json.NewDecoder(req.Body).Decode(r)
switch {
@@ -576,7 +576,7 @@ func (r RoleUpdate) GetLabels() map[string]string {
// Fill processes request and fills internal variables
func (r *RoleUpdate) Fill(req *http.Request) (err error) {
if strings.ToLower(req.Header.Get("content-type")) == "application/json" {
if strings.HasPrefix(strings.ToLower(req.Header.Get("content-type")), "application/json") {
err = json.NewDecoder(req.Body).Decode(r)
switch {
@@ -903,7 +903,7 @@ func (r RoleMove) GetOrganisationID() uint64 {
// Fill processes request and fills internal variables
func (r *RoleMove) Fill(req *http.Request) (err error) {
if strings.ToLower(req.Header.Get("content-type")) == "application/json" {
if strings.HasPrefix(strings.ToLower(req.Header.Get("content-type")), "application/json") {
err = json.NewDecoder(req.Body).Decode(r)
switch {
@@ -986,7 +986,7 @@ func (r RoleMerge) GetDestination() uint64 {
// Fill processes request and fills internal variables
func (r *RoleMerge) Fill(req *http.Request) (err error) {
if strings.ToLower(req.Header.Get("content-type")) == "application/json" {
if strings.HasPrefix(strings.ToLower(req.Header.Get("content-type")), "application/json") {
err = json.NewDecoder(req.Body).Decode(r)
switch {
@@ -1204,7 +1204,7 @@ func (r RoleTriggerScript) GetArgs() map[string]interface{} {
// Fill processes request and fills internal variables
func (r *RoleTriggerScript) Fill(req *http.Request) (err error) {
if strings.ToLower(req.Header.Get("content-type")) == "application/json" {
if strings.HasPrefix(strings.ToLower(req.Header.Get("content-type")), "application/json") {
err = json.NewDecoder(req.Body).Decode(r)
switch {
+2 -2
View File
@@ -136,7 +136,7 @@ func (r SettingsUpdate) GetValues() types.SettingValueSet {
// Fill processes request and fills internal variables
func (r *SettingsUpdate) Fill(req *http.Request) (err error) {
if strings.ToLower(req.Header.Get("content-type")) == "application/json" {
if strings.HasPrefix(strings.ToLower(req.Header.Get("content-type")), "application/json") {
err = json.NewDecoder(req.Body).Decode(r)
switch {
@@ -260,7 +260,7 @@ func (r SettingsSet) GetOwnerID() uint64 {
// Fill processes request and fills internal variables
func (r *SettingsSet) Fill(req *http.Request) (err error) {
if strings.ToLower(req.Header.Get("content-type")) == "application/json" {
if strings.HasPrefix(strings.ToLower(req.Header.Get("content-type")), "application/json") {
err = json.NewDecoder(req.Body).Decode(r)
switch {
+3 -3
View File
@@ -421,7 +421,7 @@ func (r TemplateCreate) GetLabels() map[string]string {
// Fill processes request and fills internal variables
func (r *TemplateCreate) Fill(req *http.Request) (err error) {
if strings.ToLower(req.Header.Get("content-type")) == "application/json" {
if strings.HasPrefix(strings.ToLower(req.Header.Get("content-type")), "application/json") {
err = json.NewDecoder(req.Body).Decode(r)
switch {
@@ -687,7 +687,7 @@ func (r TemplateUpdate) GetLabels() map[string]string {
// Fill processes request and fills internal variables
func (r *TemplateUpdate) Fill(req *http.Request) (err error) {
if strings.ToLower(req.Header.Get("content-type")) == "application/json" {
if strings.HasPrefix(strings.ToLower(req.Header.Get("content-type")), "application/json") {
err = json.NewDecoder(req.Body).Decode(r)
switch {
@@ -992,7 +992,7 @@ func (r TemplateRender) GetOptions() json.RawMessage {
// Fill processes request and fills internal variables
func (r *TemplateRender) Fill(req *http.Request) (err error) {
if strings.ToLower(req.Header.Get("content-type")) == "application/json" {
if strings.HasPrefix(strings.ToLower(req.Header.Get("content-type")), "application/json") {
err = json.NewDecoder(req.Body).Decode(r)
switch {
+4 -4
View File
@@ -543,7 +543,7 @@ func (r UserCreate) GetLabels() map[string]string {
// Fill processes request and fills internal variables
func (r *UserCreate) Fill(req *http.Request) (err error) {
if strings.ToLower(req.Header.Get("content-type")) == "application/json" {
if strings.HasPrefix(strings.ToLower(req.Header.Get("content-type")), "application/json") {
err = json.NewDecoder(req.Body).Decode(r)
switch {
@@ -704,7 +704,7 @@ func (r UserUpdate) GetLabels() map[string]string {
// Fill processes request and fills internal variables
func (r *UserUpdate) Fill(req *http.Request) (err error) {
if strings.ToLower(req.Header.Get("content-type")) == "application/json" {
if strings.HasPrefix(strings.ToLower(req.Header.Get("content-type")), "application/json") {
err = json.NewDecoder(req.Body).Decode(r)
switch {
@@ -1062,7 +1062,7 @@ func (r UserSetPassword) GetPassword() string {
// Fill processes request and fills internal variables
func (r *UserSetPassword) Fill(req *http.Request) (err error) {
if strings.ToLower(req.Header.Get("content-type")) == "application/json" {
if strings.HasPrefix(strings.ToLower(req.Header.Get("content-type")), "application/json") {
err = json.NewDecoder(req.Body).Decode(r)
switch {
@@ -1280,7 +1280,7 @@ func (r UserTriggerScript) GetArgs() map[string]interface{} {
// Fill processes request and fills internal variables
func (r *UserTriggerScript) Fill(req *http.Request) (err error) {
if strings.ToLower(req.Header.Get("content-type")) == "application/json" {
if strings.HasPrefix(strings.ToLower(req.Header.Get("content-type")), "application/json") {
err = json.NewDecoder(req.Body).Decode(r)
switch {