I have a file with strings and I want to read from it every time X records. I have 2 questions:
- Which type of file should I save my records? ("records.")
How can I read X records from my file and send them as json for HttpRequestBuilder as body? For example:
val request: HttpRequestBuilder = Utils.createPostBodyRequest( "request", "localhost:8080/request", Map(Constants.Content_Type -> Constants.Application_Json), ElFileBody("records.json")) def createPostBodyRequest(reqName: String, url: String, headers: Map[String, String], body: Body): HttpRequestBuilder = { http(reqName) .post(url) .headers(headers) .body(body) }