All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.eljah.utils.TrivialResourceGenerator Maven / Gradle / Ivy

Go to download

XSS Verifier is a library for verifying that the web application is XSS-free with Selenium

The newest version!
package com.github.eljah.utils;

import fi.iki.elonen.NanoHTTPD;

/**
 * Created by Ilya Evlampiev on 21.06.15.
 */
public class TrivialResourceGenerator implements ResourceGenerator {
    String resource;
    String resourceHtml;

    public void setResource(String resource)
    {
        this.resource=resource;
    }

    @Override
    public String getResource() {
        return resource;
    }

    public void setResourceValue(String html)
    {
        this.resourceHtml=html;
    }

    @Override
    public NanoHTTPD.Response responceOfResource() {
        return new NanoHTTPD.Response(NanoHTTPD.Response.Status.OK, "text/html", resourceHtml);
           }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy