atlassian-jruby-example-plugin / src / main / resources / templates / rurl.vm

#* @vtlvariable name="webResourceManager" type="com.atlassian.plugin.webresource.WebResourceManager" *#
#* @vtlvariable name="responseInformation" type="com.atlassian.plugins.polyglot.jrubyexample.servlet.HttpResponseInformation" *#
<!DOCTYPE html>
<html lang="en">
<head>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">
    <meta charset="utf-8">
    #set($includesHtml = $webResourceManager.getResourceTags("com.atlassian.example.jrubyplugin:jruby-plugin-resources"))
    $includesHtml

    <style type="text/css">
        body {
            padding-top: 60px;
            padding-bottom: 40px;
        }
    </style>
</head>
<body>

<div class="navbar navbar-fixed-top">
    <div class="navbar-inner">
        <div class="container">
            <a class="brand" href="#">JRuby Example</a>
        </div>
    </div>


<div class="container">

    #if($error)
    <div class="alert alert-error">
        $error
    </div>
    #end

    #if(!$responseInformation)
        <div class="hero-unit">
            <h1>Make an HTTP Request</h1>
            <p>
                Make an HTTP request and view the response headers and the document structure.
            </p>
        </div>
    #end
    <form action="?" class="well form-inline">
        <input type="text" name="url" value="$!url" class="span9"/>
        <button type="submit" class="btn">Submit</button>
    </form>


#if($responseInformation)

        <h3>Response Headers</h3>
<pre>
#foreach($header in $responseInformation.httpHeaders.entrySet())
$header.key: $header.value
#end
</pre>

        <h3>Document Structure</h3>
<pre>
Title: $!responseInformation.title

Headlines:
#foreach($headline in $responseInformation.headlines)
$headline
#end
</pre>

        <h3>Response Body</h3>
<pre>
#foreach($header in $responseInformation.bodyLines)
$header
#end
</pre>
#end

</div>
</body>
</html>
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.