<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>Jaggery - Delicious Javascript</title>
    <meta name="description" content="">
    <meta name="author" content="">

    <!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
    <!--[if lt IE 9]>
    <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->

    <!-- Le styles -->
    <link href="../css/bootstrap.css" rel="stylesheet">
    <style type="text/css">
        body {
            padding-top: 60px;
        }
    </style>
    <link href="../css/prettify.css" rel="stylesheet">
    <!-- Le fav and touch icons -->
    <link rel="shortcut icon" href="../images/favicon.ico">
    <link rel="apple-touch-icon" href="../images/apple-touch-icon.png">
    <link rel="apple-touch-icon" sizes="72x72"
          href="../images/apple-touch-icon-72x72.png">
    <link rel="apple-touch-icon" sizes="114x114"
          href="../images/apple-touch-icon-114x114.png">
</head>

<body>

<%
include('/includes/topnavi.jag');
%>

<div class="container-fluid" style="width: 960px; margin: auto;">
    <div class="row">
        <div class="span16">
            <div class="page-header">
                <h1>
                    Documentation
                    <small>API documentation for Jaggery.js</small>
                </h1>
            </div>
        </div>
    </div>

    <div class="row">
        <div class="span4">
            <div class="well">
                <%
                include('/includes/navi.jag');
                %>

            </div>

        </div>
        <div class="span12">
            <div class="content" id="email" name="email">
                <h3>response</h3>

            <pre class="prettyprint linenums">
&lt%
    response.addHeader("custom-header", "jaggery_response");
    print("Hello World");
%&gt
</pre>
                <%
                var resCode = '&lt%'
                + '\n response.addHeader("custom-header", "jaggery_response");'
                + '\n print("Hello World");'
                + '\n %&gt';

                var codeSnip = encodeURIComponent(resCode);
                var urlString = '../tryitframe.jag?code='+codeSnip;

                include('/includes/tryit_but.jag');
                %>
                <div id="pageLinks">
                <a class="navilink" href="#overview">Overview</a>
                <a class="navilink" href="#members">Members</a>
                <a class="navilink" href="#operations">Operations</a>
                </div>
                 <section id="overview">


                <h4>Overview</h4>
                <p class="description">Object that provides the properties and functions of HTTP Response.</p>

                </section>

                <section id="members">
                <h4>Members</h4>


                <table class="clsStd member-table">

                    <tbody>

                    <tr>

                        <th>Member</th>
                        <th>Type</th>
                        <th>Description</th>

                    </tr>

                    <tr>

                        <td><code>status</code></td>
                        <td>String</td>
                        <td><pre class="prettyprint">response.status</pre>
                            Sets the Status code
                        </td>

                    </tr>
                    <tr>

                        <td><code>contentType</code></td>
                         <td>String</td>
                        <td><pre class="prettyprint">response.contentType = 'application/x-www-form-urlencoded'</pre>
                            Sets response content type
                            
                        </td>

                    </tr>
                    <tr>

                        <td><code>characterEncoding</code></td>
                         <td>String</td>
                        <td><pre class="prettyprint">response.characterEncoding = 'UTF-8'</pre>
                            Sets response character encoding

                        </td>

                    </tr>
                    <tr>

                        <td><code>content</code></td>
                         <td>String | Object | XML</td>
                        <td>
                            <pre class="prettyprint">response.content = { products : ["Jaggery", "ESB"] };</pre>
                            <pre class="prettyprint">response.content = "My response content";</pre>
                            <p>Sets response content</p>
                            <p>If any thing other that strings are assigned, then they will be automatically serialized.</p>
                        </td>

                    </tr>

                    </tbody>
                </table>

                   </section>
                <section id="operations">
                    <h4>Operations</h4>

                 <table class="clsStd operations-table">
                     <tbody>
                     <tr>
                     <th>Operation</th>
                     <th>Returns</th>
                     <th>Description</th>
                     </tr>
                      <tr>

                        <td><code>addHeader(key, value) </code>
                        </td>
                         <td>String</td>
                        <td><pre class="prettyprint">response.addHeader('custom-header', 'jaggery_response')</pre>
                            Adding a header to the response
                        </td>

                    </tr>

                    <tr>

                        <td><code>sendRedirect(url) </code>
                        </td>
                          <td>None</td>
                        <td><pre class="prettyprint">response.sendRedirect(url)</pre>
                            Redirect via response
                                                        
                        </td>

                    </tr>

                    <tr>

                        <td><code>sendError(errCode) </code>
                        </td>
                       <td>None</td>
                        <td><pre class="prettyprint">response.sendError(errCode)</pre>
                            Send an error code
                                                        
                        </td>

                    </tr>
                    <tr>

                        <td><code>addCookie(cookie) </code>
                        </td>
                       <td>None</td>
                        <td><pre class="prettyprint">var cookie= {'name':'test','value':'Cookie testing'};
response.addCookie(cookie)</pre>
                            Adds the specified cookie to the response.
                                                        
                        </td>

                    </tr>
                     </tbody>
                 </table>


                </section>
            </div>
            <br>
            <br>
        </div>

    </div>
    <%
    include('/includes/footer.jag');
    %>

</div>

<!-- /container -->
<%
include('/includes/scripts.jag')
%>
	<script>	
		
		$(document).ready(function(){
        $('#res').toggleClass('active')
		$('#docs').addClass('active')
        })
	</script>
</body>
</html>
