示例#1
0
            public MutableString getRetValue()
            {
                if (m_strCallback.length() == 0)
                {
                    if (m_strResBody == null)
                    {
                        return(CRhoRuby.create_string(""));
                    }
                    else
                    {
                        return(CRhoRuby.create_string(m_strResBody));
                    }
                }

                return(null);
            }
示例#2
0
            void processResponse(NetResponse resp)
            {
                if (resp.isOK() && m_mapHeaders != null)
                {
                    String strContType = null;
                    m_mapHeaders.TryGetValue("content-type", out strContType);
                    if (strContType != null && strContType.indexOf("application/json") >= 0)
                    {
                        try{
                            m_valBody = fastJSON.RJSONTokener.JsonDecode(resp.getCharData());
                            return;
                        }catch (Exception exc)
                        {
                            LOG.ERROR("Incorrect json body.", exc);
                        }
                    }
                }

                m_valBody = CRhoRuby.create_string(resp.getCharData());
            }