*********************************************************
CLIENT PARAMS AND HEADERS
**********************************************************
424039
public String getParam(final String key) {
        AssertUtils.notEmpty(key, "key must not be null or empty.");
        return mParams.get(key);
    }
1179683
private function _initialize()
    {
        $params = $this->getParameters();
        $n = count($params);

        if ($params !== null) {
            for ($i = 0; $i < $n; $i++) {
                if ($params[$i] !== null) {
                    $name = $params[$i]->getName();
                    switch ($name) {
                        case 'begintoken':
                            $this->_beginToken = $params[$i]->getValue();
                            break;
                        case 'endtoken':
                            $this->_endToken = $params[$i]->getValue();
                            break;
                        case 'dir':
                            $this->_dir = $params[$i]->getValue();
                            break;
                        case 'prefix':
                            $this->_prefix = $params[$i]->getValue();
                            break;
                        case 'postfix':
                            $this->_postfix = $params[$i]->getValue();
                            break;
                        case 'translatehtml':
                            $this->_translatehtml = $params[$i]->getValue();
                            break;
                    }
                }
            }
        }
    }
503236
function ClientRequest(client, opts, endpoint, head, body, date, callback, middlewares) {
    this.client = client;
    this.opts = opts;
    this.endpoint = endpoint;
    this.head = head;
    this.body = body;
    this.date = date || Date;
    this.callback = callback;
    this.id = uuid.v4();
    this.isCanceled = false;
    this.state = ClientRequestStates.initialized;
    this.timestamp = this.date.now();
    this.middlewareStack = new middleware.MiddlewareStack(middlewares || []);
}
598830
function makeCallingParams (
  context, query, include = ['provider', 'authenticated', 'user'], inject = {}
) {
  const included = query ? { query } : {};
  const defaults = { _populate: 'skip', paginate: false };

  if (include) {
    (Array.isArray(include) ? include : [include]).forEach(name => {
      if (context.params && name in context.params) included[name] = context.params[name];
    });
  }

  return Object.assign(defaults, included, inject);
}
417057
private static String getHeaderParam( final String value, final String paramName ) {
        if( value == null || value.length() == 0 )
            return null;

        final int length = value.length();
        int start = value.indexOf(';') + 1;
        if( start == 0 || start == length )
            return null;

        int end = value.indexOf(';', start);
        if( end == -1 )
            end = length;

        while( start < end ) {
            int nameEnd = value.indexOf('=', start);
            if( nameEnd != -1 && nameEnd < end && paramName.equals(value.substring(start, nameEnd).trim()) ) {
                String paramValue = value.substring(nameEnd + 1, end).trim();
                int valueLength = paramValue.length();
                if( valueLength != 0 )
                    if( valueLength > 2 && '"' == paramValue.charAt(0) && '"' == paramValue.charAt(valueLength - 1) )
                        return paramValue.substring(1, valueLength - 1);
                    else
                        return paramValue;
            }

            start = end + 1;
            end = value.indexOf(';', start);
            if( end == -1 )
                end = length;
        }

        return null;
    }
1345626
function initParams(uri, options, callback) {
      if (typeof options === 'function') {
        callback = options
      }

      var params = {}
      if (typeof options === 'object') {
        extend(params, options, { uri: uri })
      } else if (typeof uri === 'string') {
        extend(params, { uri: uri })
      } else {
        extend(params, uri)
      }

      params.callback = callback
      return params
    }
1251685
function(request, parameters) {
	if (!parameters) {
		return;
	}

	var keys = Object.keys(parameters);
	var type = false;
	var value = null;
	var options = null;
	for (var i = keys.length - 1; i >= 0; i--) {
		value = parameters[keys[i]];
		options = null;

		if (value instanceof Object && value.type && value.hasOwnProperty('value')) {
			if (value.hasOwnProperty('options')) {
				options = value.options;
			}
			type = value.type;
			value = value.value;
		}
		else {
			type = exports.detectParameterType(value);
		}

		if (!(value instanceof Array)) {
			request.addParameter(keys[i], type, value, options);
			continue;
		}
	}
}
259657
function(uri, method, form) {
  this.method = method = method || 'GET';
  this.headers = {};
  this.url = uri;
  this.pathname = uri;
  this.cookies = {};
  this.params = [];

  if (document.cookie) {
    this.headers['Cookie'] = document.cookie;
    this.cookies = DOM.getCookies();
  }

  if (form) {
    var serial = DOM.serialize(form) || {};
    this.headers['Content-Type'] =
      form.enctype || 'application/x-www-form-urlencoded';
    if (method === 'GET') {
      this.query = serial.data;
      this.rawQuery = serial.encoded;
    } else {
      this.body = serial.data;
      this.rawBody = serial.encoded;
    }
    // method override
    if (serial.data & serial.data._method) {
      this.method = method = serial.data._method.toUpperCase();
    }
  }

  if (~uri.indexOf('?')) {
    uri = uri.split('?');
    this.query = parsePairs(uri[1], '&');
    this.rawQuery = uri[1];
    this.pathname = uri = uri[0];
  }
}
757111
function (param, callbackId) {
    if (typeof param === 'string') {
      try {
        param = JSON.parse(param)
      }
      catch (e) {
        return
      }
    }
    if (typeof param !== 'object' || !param.url) {
      return console.error(
        '[h5-render] invalid config or invalid config.url for sendHttp API')
    }

    const sender = this.sender
    const method = param.method || 'GET'
    const xhr = new XMLHttpRequest()
    xhr.open(method, param.url, true)
    xhr.onload = function () {
      sender.performCallback(callbackId, this.responseText)
    }
    xhr.onerror = function (error) {
      return console.error('[h5-render] unexpected error in sendHttp API', error)
      // sender.performCallback(
      //   callbackId,
      //   new Error('unexpected error in sendHttp API')
      // )
    }
    xhr.send()
  }
184648
function (params) {
    var resourceObject = {
      url: resource.url(),
      method: method,
      headers: resource.headers
    };
    
    if (typeof params === 'object') {
      resourceObject.json = true;
      resourceObject.body = params;
    }
    else if (typeof params === 'string') {
      resourceObject.body = params;
    }
    
    // Should this resource be mocked, or real?
    // It is ensured that you can define the mock before
    // or after the resource is defined
    var mock = self.mock(method, uri);
    if (mock) {
      mock.request = {
        body: params,
        method: method,
        pathname: slash(uri),
        headers: resource.headers
      };
      return mock.fn()();
    }
    else {
      return rawHttp(extend(resourceObject, resource.xhrOptions || {}));
    }
  }
763522
public void processHeaderParams(Map<String, String> headerParams, Request.Builder reqBuilder) {
        for (Entry<String, String> param : headerParams.entrySet()) {
            reqBuilder.header(param.getKey(), parameterToString(param.getValue()));
        }
        for (Entry<String, String> header : defaultHeaderMap.entrySet()) {
            if (!headerParams.containsKey(header.getKey())) {
                reqBuilder.header(header.getKey(), parameterToString(header.getValue()));
            }
        }
    }
527704
def post(url, parameters = {})
      response = connection.post do |req|
        req.url "#{api_endpoint}#{url}"
        req.headers['Content-Type'] = 'application/json'
        req.body = parameters.to_json
      end
      on_complete(response)
      response
    end
1260786
function setClientInfo(req) {

	let client = req.client = {};

	initUserAgendAndOS(req.headers, client);
	initClientIp(req, client);
}
772399
function request(req) {
        var clientID = getParam(req, 'client_id')
            , redirectURI = getParam(req, 'redirect_uri')
            , scope = getParam(req, 'scope')
            , state = getParam(req, 'state');

        if (!clientID) {
            throw new AuthorizationError('Missing required parameter: client_id', 'invalid_request');
        }

        if (scope) {
            for (var i = 0, len = separators.length; i < len; i++) {
                var separated = scope.split(separators[i]);
                // only separate on the first matching separator.  this allows for a sort
                // of separator "priority" (ie, favor spaces then fallback to commas)
                if (separated.length > 1) {
                    scope = separated;
                    break;
                }
            }

            if (!Array.isArray(scope)) {
                scope = [scope];
            }
        }

        return {
            clientID: clientID,
            redirectURI: redirectURI,
            scope: scope,
            state: state
        };
    }
671560
function parseSimpleParams (req, res, next) {
  let params = getParams(req);

  if (params.length > 0) {
    util.debug("Parsing %d request parameters...", params.length);

    params.forEach((param) => {
      // Get the raw value of the parameter
      switch (param.in) {
        case "query":
          util.debug('    Parsing the "%s" query parameter', param.name);
          req.query[param.name] = parseParameter(param, req.query[param.name], param);
          break;
        case "header":
          // NOTE: req.headers properties are always lower-cased
          util.debug('    Parsing the "%s" header parameter', param.name);
          req.headers[param.name.toLowerCase()] = parseParameter(param, req.header(param.name), param);
          break;
      }
    });
  }

  next();
}
1251461
private void loadServerParameters() {
    serverParser.addArgument("-p", "--port").required(true)
        .help("Port to be assigned to the server.\n");
    serverParser.addArgument("-m", "--model").required(true)
        .help("It is required to provide a model to perform POS tagging.");
    this.serverParser.addArgument("-lm", "--lemmatizerModel")
        .required(true)
        .help("It is required to provide a lemmatizer model.");
    serverParser.addArgument("-l", "--language")
        .choices("de", "en", "es", "eu", "fr", "gl", "it", "nl")
        .required(true)
        .help("Choose a language to perform annotation with ixa-pipe-pos.");

    serverParser.addArgument("--beamSize").required(false)
        .setDefault(DEFAULT_BEAM_SIZE)
        .help("Choose beam size for decoding, it defaults to 3.");
    serverParser.addArgument("-o", "--outputFormat").required(false)
        .choices("naf", "conll")
        .setDefault(Flags.DEFAULT_OUTPUT_FORMAT)
        .help("Choose output format; it defaults to NAF.\n");
    serverParser.addArgument("-mw", "--multiwords")
        .action(Arguments.storeTrue())
        .help("Use to detect and process multiwords.\n");
    serverParser.addArgument("-d", "--dictag")
        .action(Arguments.storeTrue())
        .help("Post process POS tagger output with a monosemic dictionary.\n");
    serverParser.addArgument("-a","--allMorphology")
        .action(Arguments.storeTrue())
        .help("Print all the POS tags and lemmas before disambiguation.\n");
  }
1023597
function() {
  var args = Array.from(arguments)
  var url = _.get(args, '[0]', '')
  var params = _.get(args, '[1]', {})

  // if we specify all of the options as a param object, we're basically done
  // and we can skip all of the parameterization checks below
  if (_.isPlainObject(_.get(args, '[0]', {})))
  {
    params = _.get(args, '[0]', {})
  }
   else
  {
    params = _.assign({}, { url }, params)
  }

  return _.assign({}, params, { op: 'request' })
}