<commit_before>const _ = require('lodash')
const steps = exports

steps['a server url (.*)'] =
steps['a request to (.*)'] = function (url, done) {
  this._request = this.HttpClient()
  this.url = url
  done()
}

steps['^the request method is ([a-z]{3,7})$'] = function (method, done) {
  this.method = method.toUpperCase()
  done()
}

steps['^with the following query params "(.*)"$'] = function (params, done) {
  this.url += '?' + params
  done()
}

steps['^request path value is "(.*)"$'] = function (path, done) {
  this.url += path
  done()
}

steps['^request content type is "(.*)"$'] = function (mime, done) {
  this.requestType = mime
  done()
}

steps['^request payload is:$'] = function (data, done) {
  this.data = data<commit_msg>feat(steps): improve steps<commit_after>const _ = require('lodash')
const steps = exports

// Given
steps['[request|server] url (.*)'] = function (url, done) {
  this._request = this.HttpClient()
  this.url = url
  done()
}

steps['the request method is ([a-z]{3,7})$'] = function (method, done) {
  this.method = method.toUpperCase()
  done()
}

steps['^with the following query params "(.*)"$'] = function (params, done) {
  this.url += '?' + params
  done()
}

steps['^request path value is "(.*)"$'] = function (path, done) {
  this.url += path
  done()
}

steps['[the]?[\s+]?request content type is "(.*)"$'] = function (mime, done) {
  this.requestType = mime
  done()
}

steps['[the]?[\s+]?request [body|payload] is:$'] = function (data, done) {
  this.data = data
{'fraction_non_alphanumeric': 0.21348314606741572, 'fraction_numerical': 0.0026437541308658294, 'mean_word_length': 4.080536912751678, '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': '3583870', 'n_tokens_mistral': 546, 'n_tokens_neox': 534, 'n_words': 136}