query-parameters

JAX-RS and unknown query parameters

萝らか妹 提交于 2020-02-02 02:43:11
问题 I have a Java client that calls a RESTEasy (JAX-RS) Java server. It is possible that some of my users may have a newer version of the client than the server. That client may call a resource on the server that contains query parameters that the server does not know about. Is it possible to detect this on the server side and return an error? I understand that if the client calls a URL that has not been implemented yet on the server, the client will get a 404 error, but what happens if the

RestTemplate: How to send URL and query parameters together

淺唱寂寞╮ 提交于 2020-01-30 14:01:15
问题 I am trying to pass path param and query params in a URL but I am getting a weird error. below is the code String url = "http://test.com/Services/rest/{id}/Identifier" Map<String, String> params = new HashMap<String, String>(); params.put("id", "1234"); UriComponentsBuilder builder = UriComponentsBuilder.fromUriString(url) .queryParam("name", "myName"); String uriBuilder = builder.build().encode().toUriString(); restTemplate.exchange(uriBuilder , HttpMethod.PUT, requestEntity, class_p, params

Ember alternative to query params with service

主宰稳场 提交于 2020-01-25 07:47:10
问题 So I have a route with this model: model() { var self = this; return RSVP.hash({ comptes : this.get('store').findAll('compte'), contrats: this.get('store').findAll('contrat').then(function(contrats) { return contrats.filterBy("contrat_fk.id", self.get('currentContract.contrat.id')); }), }) } My goal is to filter the model contrat with the value provided by my service currentContract. It works fine when the page is reloaded, but when I change the route and comeback to this route, the model

PostGIS query failing due to escape string?

和自甴很熟 提交于 2020-01-16 07:19:27
问题 I have this Postgres/PostGIS query: UPDATE raw.geocoding SET the_geom = ST_Transform(ST_GeomFromText('POINT(((E'-96.6864379495382')::float8) ((E'32.792527154088')::float8))', 4326),3081) WHERE id=((10793455)::int4) When I run it, I get this error: ERROR: syntax error at or near "')::float8) ((E'" LINE 2: ...sform(ST_GeomFromText('POINT(((E'-96.6864379495382')::float8... ^ ********** Error ********** ERROR: syntax error at or near "')::float8) ((E'" SQL state: 42601 Character: 94 I'm

PostGIS query failing due to escape string?

北战南征 提交于 2020-01-16 07:19:20
问题 I have this Postgres/PostGIS query: UPDATE raw.geocoding SET the_geom = ST_Transform(ST_GeomFromText('POINT(((E'-96.6864379495382')::float8) ((E'32.792527154088')::float8))', 4326),3081) WHERE id=((10793455)::int4) When I run it, I get this error: ERROR: syntax error at or near "')::float8) ((E'" LINE 2: ...sform(ST_GeomFromText('POINT(((E'-96.6864379495382')::float8... ^ ********** Error ********** ERROR: syntax error at or near "')::float8) ((E'" SQL state: 42601 Character: 94 I'm

Ember .observe() returns callback twice when used with query-params

让人想犯罪 __ 提交于 2020-01-11 13:05:41
问题 http://jsbin.com/vowup/2 If I click change to random, program logs in console twice. For some strange reason it works ok when setting revision variable to string, but logs twice for number or any other kind of variable 回答1: Change your code to this and the answer will become clear: toggleHistory: (function() { console.log(this.get("revision")); }).observes("revision") You will see output like: 0.7038348997011781 "0.7038348997011781" Your numbers are being coerced to strings. That is caused by

Change query parameters of URL using dynamic parameter and value in jQuery

删除回忆录丶 提交于 2020-01-06 05:29:05
问题 I need to change the value of query parameters of the given URL irrespective of value type. I have a function like, function urlGenerator (key, value) { var url = "www.domain.com/?id=10&name=xxx&dob=2018-12-13"; // change the value for given key return url; } The order of query parameters are not fixed. It may be of any order. I think the solution can be found by Regex. I need generic solution irrespective of the type of value given to above specified URL. I need to call the above method like

Are query parameters allowed in opaque URIs?

a 夏天 提交于 2020-01-05 08:31:31
问题 Java's URI class defines opaque URIs as follows (emphasis mine). A URI is opaque if, and only if, it is absolute and its scheme-specific part does not begin with a slash character ('/'). An opaque URI has a scheme, a scheme-specific part, and possibly a fragment; all other components are undefined . True to the documentation, an opaque URI returns null for a query param. URI uri = URI.create("stackoverflow:foo?key=value#frag"); uri.isOpaque() == true uri.getScheme() == stackoverflow uri

Are query parameters allowed in opaque URIs?

元气小坏坏 提交于 2020-01-05 08:30:46
问题 Java's URI class defines opaque URIs as follows (emphasis mine). A URI is opaque if, and only if, it is absolute and its scheme-specific part does not begin with a slash character ('/'). An opaque URI has a scheme, a scheme-specific part, and possibly a fragment; all other components are undefined . True to the documentation, an opaque URI returns null for a query param. URI uri = URI.create("stackoverflow:foo?key=value#frag"); uri.isOpaque() == true uri.getScheme() == stackoverflow uri

React Router and Arbitrary Query Params: Page Refreshes Unintentionally on Load?

点点圈 提交于 2020-01-04 12:15:12
问题 I've been using React Router with great success the past few weeks, but I just ran into an issue that I can't seem to find a resolution for. Whenever an arbitrary query parameter is appended to a url (in our case, for URL tracking purposes from email) the page that you land on will load, then automatically refresh without warning. Given the most basic of route setups: var routes = ( <Route handler={ResultsController}> <DefaultRoute handler={Results} /> </Route> ); And a default handler: