/** * {@inheritDoc} */ @Override public void setMethod(String post_get) { SAMPLE.setMethod(post_get); }
/** * Set method on sampler * @param sampler {@link HTTPSamplerBase} * @param request {@link HttpRequestHdr} */ protected void computeMethod(HTTPSamplerBase sampler, HttpRequestHdr request) { sampler.setMethod(request.getMethod()); log.debug("Proxy: setting method: " + sampler.getMethod()); }
private void addFormUrls(Document html, HTTPSampleResult result, HTTPSamplerBase config, List<HTTPSamplerBase> potentialLinks) { NodeList rootList = html.getChildNodes(); List<HTTPSamplerBase> urls = new LinkedList<>(); for (int x = 0; x < rootList.getLength(); x++) { urls.addAll(HtmlParsingUtils.createURLFromForm(rootList.item(x), result.getURL())); } for (HTTPSamplerBase newUrl : urls) { newUrl.setMethod(HTTPConstants.POST); if (log.isDebugEnabled()) { log.debug("Potential Form match: " + newUrl.toString()); } if (HtmlParsingUtils.isAnchorMatched(newUrl, config)) { log.debug("Matched!"); potentialLinks.add(newUrl); } } }
private void addFormUrls(Document html, HTTPSampleResult result, HTTPSamplerBase config) { NodeList rootList = html.getChildNodes(); List<HTTPSamplerBase> urls = new LinkedList<HTTPSamplerBase>(); for (int x = 0; x < rootList.getLength(); x++) { urls.addAll(HtmlParsingUtils.createURLFromForm(rootList.item(x), result.getURL())); } for (Iterator<HTTPSamplerBase> it = urls.iterator(); it.hasNext();) { HTTPSamplerBase newUrl = it.next(); newUrl.setMethod(HTTPConstants.POST); /* * if (log.isDebugEnabled()) { log.debug("Potential Form match: " + * newUrl.toString()); } * */ if (HtmlParsingUtils.isAnchorMatched(newUrl, config)) { //log.debug("Matched!"); addURL(newUrl); } } }
HTTPSamplerBase newUrl = HtmlParsingUtils.createUrlFromAnchor( hrefStr, ConversionUtils.makeRelativeURL(result.getURL(), base)); newUrl.setMethod(HTTPConstants.GET); if (log.isDebugEnabled()) { log.debug("Potential <frame src> match: " + newUrl);
newUrl.setMethod(HTTPConstants.GET); if (log.isDebugEnabled()) { log.debug("Potential <a href> match: " + newUrl);
HTTPSamplerBase newUrl = HtmlParsingUtils.createUrlFromAnchor( hrefStr, ConversionUtils.makeRelativeURL(result.getURL(), base)); newUrl.setMethod(HTTPConstants.GET);
newUrl.setMethod(HTTPConstants.GET);