use of org.apache.jena.sparql.engine.http.Params in project jena by apache.
the class TestHttpOp method httpPost_04.
@Test
public void httpPost_04() {
Params params = new Params();
params.addParam("query", "ASK{}");
TypedInputStream in = HttpOp.execHttpPostFormStream(queryURL, params, WebContent.contentTypeResultsJSON);
IO.close(in);
}
use of org.apache.jena.sparql.engine.http.Params in project jena by apache.
the class TestHttpOp method httpPost_06.
@Test
public void httpPost_06() {
Params params = new Params().addParam("request", "CLEAR ALL");
HttpOp.execHttpPostForm(updateURL, params);
}
use of org.apache.jena.sparql.engine.http.Params in project jena by apache.
the class TestHttpOp method httpPost_05.
public void httpPost_05() {
Params params = new Params().addParam("query", "ASK{}");
// Query to Update
execWithHttpException(HttpSC.BAD_REQUEST_400, () -> HttpOp.execHttpPostFormStream(updateURL, params, WebContent.contentTypeResultsJSON));
}
use of org.apache.jena.sparql.engine.http.Params in project jena by apache.
the class UpdateProcessRemoteForm method execute.
@Override
public void execute() {
// Validation
if (this.getEndpoint() == null)
throw new ARQException("Null endpoint for remote update by form");
if (this.getUpdateRequest() == null)
throw new ARQException("Null update request for remote update");
// Execution
String reqStr = this.getUpdateRequest().toString();
Params ps = new Params(this.getParams());
ps.addParam(HttpParams.pUpdate, reqStr);
execHttpPostForm(this.getEndpoint(), ps, null, HttpResponseLib.nullResponse, getClient(), getHttpContext());
}
Aggregations