Questions tagged [uribuilder]

82 questions
2
votes
2 answers

URI builder in Android, odd URL

I'm trying to use the URI builder in Android to create a URL with variables. I have read Use URI builder in Android or create URL with variables, but some symbols that I need aren't covered in that. An example of URL that I want to…
misaochan
  • 890
  • 2
  • 8
  • 25
2
votes
1 answer

URI Builder result has an unexpected colon in it (Android Programming)

For Uri.Builder, I'm using scheme(String) and building a URL string from there. However, within my final String there is a colon symbol : which changes the results from the query. Here is my code. Uri.Builder toBuild = new Uri.Builder(); …
kthieu
  • 187
  • 2
  • 17
2
votes
2 answers

Use UriBuilder and construct httpRequest

I try to build the following uri http://localhost:8080/TestService.svc/RunTest I do it as following var uriBuilder = new UriBuilder(); uriBuilder.Host = "localhost:8080/TestService.svc"; uriBuilder.Path = String.Format("/{0}", "RunTest"); string…
YAKOVM
  • 9,805
  • 31
  • 116
  • 217
2
votes
1 answer

How to build URL in Groovy

I think, I want to use URIBuilder here but not entirely sure... I have the following code: String serverURL = getServerURL(); // ex: "http://somesrv.example.com" String appURL = getAppURL(); // ex: "http://myapp.example.com" I now need to add the…
IAmYourFaja
  • 55,468
  • 181
  • 466
  • 756
2
votes
1 answer

URIBuilder build() cuts Port?

I tried to build a URI using URIBuilder using a specific port and a key,value pair. URIBuilder builder = new URIBuilder(); URI address = builder.setScheme("http") .setPath("127.0.0.1") …
Heiniken
  • 21
  • 3
2
votes
2 answers

UriBuilder points to localhost instead of domain name

My site has a public section that is accessed by http and a https part to requires logging in. When logging out of the site, it redirects to the http public index page. Previously I had done this with stating the full url to point too. Recently I…
David
  • 21
  • 1
  • 2
1
vote
1 answer

Java URI Builder build method replacing "?" character in the path

I have an API at the following path /v0/segments/ch/abc/view/status/ACTIVE?sc=%s&expiryGteInMs=%d I am building a Client using the URIBuilder in Java. return UriBuilder .fromUri(config.getHost()) …
1
vote
1 answer

how to get the class name at run time from a generic method that is in another class?

I am trying to generate my baseurl using UriBuilder. I have created a generic "GetRequestUrl" which is in my TestUtil class. How can I get the name of my Test class at run time using this method and append to the string serviceAPI //Here is the…
JamesOein
  • 19
  • 4
1
vote
1 answer

How to embed a colon in the fragment part of URL without it being encoded?

I am trying to construct the below URL: https://console.aws.amazon.com/elasticmapreduce/home?region=us-east-1#cluster-details:j-1IGU6572KT6LB I am not sure how to include the :j-1IGU6572KT6LB. When I include :`, it gets encoded. Trying to see if…
user2221654
  • 311
  • 1
  • 7
  • 20
1
vote
0 answers

Difference between Uri.Builder appendQueryParameter() and query() when using query geo URI?

For the following code, why does appendQueryParameter open the correct given location but query does not?: String address = "Mountain View, California, United States"; Uri.Builder builder = new Uri.Builder(); builder.scheme("geo") …
surajs02
  • 451
  • 7
  • 18
1
vote
0 answers

URI builder ignoring some parameters

I came across a problem that has me worried, I use URI bulder in my app to build the urls i use to transmit data between the app and my web server, like this: Uri.Builder builder = new Uri.Builder() .appendQueryParameter("myData", fullData) …
JStephen
  • 1,059
  • 3
  • 13
  • 28
1
vote
0 answers

JerseyUriBuilder query value encoding behavior changing in release 2.20

JerseyUriBuilder encoding behavior changes in release 2.20. I detected this for URIs where a value in the query string part is '*'. Up to version 2.19 of the jersey-common library, there is no encoding happening, starting with 2.20 it gets…
user1050755
  • 11,218
  • 4
  • 45
  • 56
1
vote
1 answer

Is there a hostname moniker for URI with serverless bindings?

I am constructing a URI for an LDAP connection. I know Microsoft does support serverless binding using ldap:///cn=... notation, and that URI will work with .NET, but UriBuilder will not produce a correct URI if port is specified. For example: var ub…
galets
  • 17,802
  • 19
  • 72
  • 101
1
vote
1 answer

Using HttpClient to send JSON query string in a URL to a web service (Java)

I have a web service that I built... what I am trying to do now is send a simple request that contains a json query string from a Tapestry web app to that web service. I searched around and most people say to use Apache HttpClient to achieve this.…
mfunaro
  • 574
  • 6
  • 23
0
votes
1 answer

Uri.GetComponents return query params even if its not requested

I am trying to extract the path of my PathString without the query parameters. So I did the following: var ps = new PathString("/someapi/wayne/insane?param=1234&ups=134"); var u = new UriBuilder(); u.Path = ps; // Built Uri:…
greg-e
  • 374
  • 4
  • 18