<commit_before>package io.gatling.http.request.builder

import java.net.URI
import io.gatling.core.session.Expression

/**
 * @param requestName the name of the request
 */
class Http(requestName: Expression[String]) {

	def get(url: Expression[String]) = httpRequest("GET", Left(url))
	def get(uri: URI) = httpRequest("GET", Right(uri))
	def put(url: Expression[String]) = httpRequest("PUT", Left(url))
	def patch(url: Expression[String]) = httpRequest("PATCH", Left(url))
	def head(url: Expression[String]) = httpRequest("HEAD", Left(url))
	def delete(url: Expression[String]) = httpRequest("DELETE", Left(url))
	def options(url: Expression[String]) = httpRequest("OPTIONS", Left(url))
	def httpRequest(method: String, urlOrURI: Either[Expression[String], URI]) = new HttpRequestBuilder(CommonAttributes(requestName, method, urlOrURI), HttpAttributes())

	def post(url: Expression[String]) = httpRequestWithParams("POST", Left(url))
	def httpRequestWithParams(method: String, urlOrURI: Either[Expression[String], URI]) = new HttpRequestWithParamsBuilder(CommonAttributes(requestName, method, urlOrURI), HttpAttributes(), Nil)
}<commit_msg>Add httpRequest and httpRequestWithParams that take a simple Expression[String] url<commit_after>package io.gatling.http.request.builder

import java.net.URI
import io.gatling.core.session.Expression

/**
 * @param requestName the name of the request
 */
class Http(requestName: Expression[String]) {

	def get(url: Expression[String]) = httpRequest("GET", url)
	def get(uri: URI) = httpRequest("GET", Right(uri))
	def put(url: Expression[String]) = httpRequest("PUT", url)
	def patch(url: Expression[String]) = httpRequest("PATCH", url)
	def head(url: Expression[String]) = httpRequest("HEAD", url)
	def delete(url: Expression[String]) = httpRequest("DELETE", url)
	def options(url: Expression[String]) = httpRequest("OPTIONS", url)
	def httpRequest(method: String, url: Expression[String]): HttpRequestBuilder = httpRequest(method, Left(url))
	def httpRequest(method: String, urlOrURI: Either[Expression[String], URI]): HttpRequestBuilder = new HttpRequestBuilder(CommonAttributes(requestName, method, urlOrURI), HttpAttributes())

	def post(url: Expression[String]) = httpRequestWithParams("POST", url)
	def httpRequestWithParams(method: String, url: Expression[String]): HttpRequestWithParamsBuilder = httpRequestWithParams(method, Left(url))
	def httpRequestWithParams(method: String, urlOrURI: Either[Expression[String], URI]): HttpRequestWithParamsBuilder = new HttpRequestWithParamsBuilder(CommonAttributes(requestName, method, urlOrURI), HttpAttributes(), Nil)
}
{'fraction_non_alphanumeric': 0.13705972434915772, 'fraction_numerical': 0.0, 'mean_word_length': 8.536496350364963, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5277945', 'n_tokens_mistral': 751, 'n_tokens_neox': 739, 'n_words': 185}