rest - How can I use a String in an URL? -
i'm trying create web service can send stardog request using http method. problem stardog request using few symbol aren't allowed in url, ?
or ;
, i'm trying not force user manually convert %3f
or %3b
.
so want url :
localhost:8080/webservicetest/query?select="select * {?s ?p ?o}"
my jersey annotations following:
@get @path("/query") @produces(mediatype.application_json + ";charset=utf-8") public string execquery(@queryparam("select") string selectquery, @queryparam("update") string updatequery) {
does know if possible? , if is, how can that?
if use javascript/ecmascript 5.1++ on client side can convert string uri string format. use method
encodeuricomponent(str);
which explained here.
it possible replace ? ; chars %-represetation. (in case of using curl)
(space) ! " # $ % & ' ( ) * + , / : ; %20 %21 %22 %23 %24 %25 %26 %27 %28 %29 %2a %2b %2c %2f %3a %3b = ? @ [ ] %3d %3f %40 %5b %5d
Comments
Post a Comment