github.com/blend/go-sdk@v1.20240719.1/web/xml_result.go (about)

     1  /*
     2  
     3  Copyright (c) 2024 - Present. Blend Labs, Inc. All rights reserved
     4  Use of this source code is governed by a MIT license that can be found in the LICENSE file.
     5  
     6  */
     7  
     8  package web
     9  
    10  import "github.com/blend/go-sdk/webutil"
    11  
    12  // XMLResult is a json result.
    13  type XMLResult struct {
    14  	StatusCode int
    15  	Response   interface{}
    16  }
    17  
    18  // Render renders the result
    19  func (ar *XMLResult) Render(ctx *Ctx) error {
    20  	return webutil.WriteXML(ctx.Response, ar.StatusCode, ar.Response)
    21  }