These are chat archives for gin-gonic/gin

5th
May 2016
Lingchao Xin
@douglarek
May 05 2016 04:03
Hi everyone; I have some trouble in Gin
When panic happened, Gin will recovery from it ; But My program killed itself; what maybe happended ? is it related to Middleware I wrote ?
Lingchao Xin
@douglarek
May 05 2016 04:22

When panic happened, Gin will recovery from it ; But My program killed itself; what maybe happended ? is it related to Middleware I wrote ?

release mode

bellevuerails
@bellevuerails
May 05 2016 08:35
Not sure if this is the right place to ask for help. I am using Go and Gin (new to both) to build a backend service to interact with Twilio SMS. Twilio work with my backend via webhook. When the backend received a text from twilio, I want to response with a simple message saying "I got it". I need to format the response and send back in XML format that twilio wanted to see but struggle on how to do it. Here is the format that I like to send back:

<?xml version="1.0" encoding="UTF-8"?>

<Response>
<Message>I got it</Message>
</Response>

I try using c.Context ... ie. c.XML(200, gin.H{ .. but unsuccessful. Any help is appreciated.
bellevuerails
@bellevuerails
May 05 2016 23:17
@bellevuerails I forgot to add the response I receive on the twilio side. I got the string :
<string><?xml version=&#34;1.0&#34; encoding=&#34;UTF-8&#34;?>&#xA;<Response>&#xA;&#x9;<Message>Hello</Message>&#xA;</Response></string>