Search in sources :

Example 1 with Pair

use of org.apache.jena.sparql.engine.http.Params.Pair in project jena by apache.

the class HttpOp method convertFormParams.

private static HttpEntity convertFormParams(Params params) {
    List<NameValuePair> nvps = new ArrayList<>();
    for (Pair p : params.pairs()) nvps.add(new BasicNameValuePair(p.getName(), p.getValue()));
    HttpEntity e = new UrlEncodedFormEntity(nvps, StandardCharsets.UTF_8);
    return e;
}
Also used : BasicNameValuePair(org.apache.http.message.BasicNameValuePair) BasicNameValuePair(org.apache.http.message.BasicNameValuePair) ArrayList(java.util.ArrayList) UrlEncodedFormEntity(org.apache.http.client.entity.UrlEncodedFormEntity) BasicNameValuePair(org.apache.http.message.BasicNameValuePair) Pair(org.apache.jena.sparql.engine.http.Params.Pair)

Aggregations

ArrayList (java.util.ArrayList)1 UrlEncodedFormEntity (org.apache.http.client.entity.UrlEncodedFormEntity)1 BasicNameValuePair (org.apache.http.message.BasicNameValuePair)1 Pair (org.apache.jena.sparql.engine.http.Params.Pair)1