query-parameters

Use object type query param in swagger documentation

不问归期 提交于 2019-12-17 20:45:51
问题 I have a GET route where I would like to encode an object parameter in the url as a query string. When writing the swagger documentation I basically get errors that disallow me to use schema / object types in a query type parameter: paths: /mypath/: get: parameters - in: path name: someParam description: some param that works required: true type: string format: timeuuid #good param, works well - $ref: "#/parameters/mySortingParam" #this yields an error parameters: mySortingParam name: paging

When to use query parameters versus matrix parameters?

大憨熊 提交于 2019-12-17 08:04:21
问题 Query parameters : http://example.com/apples?order=random&color=blue Matrix parameters : http://example.com/apples;order=random;color=blue When should one use query parameters versus matrix parameters? Why can matrix parameters be used in the middle of a URL but query parameters cannot? For example: http://example.com/apples;order=random;color=blue/2006/archive If matrix parameters are a superset of query parameters, why not use them all the time? You can read more about matrix parameters

use a variable for table name in mysql sproc

こ雲淡風輕ζ 提交于 2019-12-17 03:37:21
问题 I'm trying to pass a table name into my mysql stored procedure to use this sproc to select off of different tables but it's not working... this is what I"m trying: CREATE PROCEDURE `usp_SelectFromTables`( IN TableName varchar(100) ) BEGIN SELECT * FROM @TableName; END I've also tried it w/o the @ sign and that just tells me that TableName doesn't exist...which I know :) 回答1: It depends on the DBMS, but the notation usually requires Dynamic SQL, and runs into the problem that the return values

PHP $_GET is not populating with URL query parameters, from web browser

北城余情 提交于 2019-12-13 18:05:12
问题 I'm running into a strange issue where the $_GET (and $_REQUEST ) variable is empty, even though the parameters are being passed. My PHP code: echo $_SERVER['REQUEST_URI']; echo print_r($_REQUEST); echo print_r($_GET); Output: /service/getAllOrders?sortBy=date_created&sortDir=desc Array() Array() I'm using nginx and forwarding all requests to index.php. My configuration is as follows: server { listen 80; server_name decaro.localhost; root /Users/rweiss/Sites/decaro/LocalOrderWebsite; #access

how to PUT multiple query parameter in REST web service

▼魔方 西西 提交于 2019-12-12 11:43:08
问题 Do anyone know how to PUT multiple query parameter in REST web service? I have write using java.My curl sample is like this: curl -X PUT http://localhost:8080/project/resources/user/directory/sub-directory?name=shareuser&type=Read -v My program is : @PUT @Path("{user}/{directory:.+}") public Response doshare(@PathParam("user")String name, @PathParam("directory")String dir, @QueryParam("name")String sharename, @QueryParam("type")String type){ mongoDAOImpl impl=new mongoDAOImpl(); Mongo mongo

How can I overload a method with @QueryParam in Jersey/Spring?

为君一笑 提交于 2019-12-12 11:35:12
问题 I would like to overload a method with the @QueryParam but everytime I try to execute this code it throws: SEVERE: Exception occurred when intialization com.sun.jersey.spi.inject.Errors$ErrorMessagesException My code is: @GET @Path("/test") @Produces("text/plain") public String getText(@QueryParam("PID") String pid) { return pid; } @GET @Path("/test") @Produces("text/plain") public String getText(@QueryParam("PID") String pid, @QueryParam("NAME") String name) { return pid + name; } 回答1: No

Any justification for an IT policy that query parameters should not be used?

风流意气都作罢 提交于 2019-12-12 09:58:11
问题 My company, which builds ad server, affiliate network, contact form and CRM software was acquired last year, and we are now in the process of reworking our technology to fit the IT policies and guidelines of the parent corporation. One of these policies is a tremendous sticking point and causing all sorts of problems for us: No query parameters are to be used in any URL visible to the end user This includes content URLs, ad clickthrough targets, redirects, anything which will either show up

How can I use SQLite query parameters in a WinRT app?

不羁岁月 提交于 2019-12-12 04:36:29
问题 I want to use query parameters in my update sql, and had this code: internal static int UpdatePhotosetName(string oldPhotosetName, string newPhotosetName) { String qryUpdateBaseTable = "UPDATE PhotraxBaseData SET photosetName = @newName WHERE photosetName = @oldName"; int rowsUpdated; using (var db = new SQLite.SQLiteConnection(App.DBPath)) { SQLiteCommand cmd = new SQLiteCommand(db); cmd.CommandText = qryUpdateBaseTable; cmd.Parameters.Add(new SQLiteParameter("@newName")); cmd.Parameters.Add

Angular 2 router queryParams are not added into url

為{幸葍}努か 提交于 2019-12-11 17:36:29
问题 I have an auth guard, which protects somes pages of my web-app. During the redirect i wanted to add queryParams to my url to allow user to come back to the site he want to pass. Code below was working for a few time. Today i realised that queryParms are not present in the url async canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Promise<boolean> { let isLogged: boolean = this.loggedInCustomer.isLoggedIn(); if (!isLogged) { console.log(state.url); this.router

Spring, middle score in request parameter

旧街凉风 提交于 2019-12-11 12:16:44
问题 Is there a way to map a query parameter with a middle score using requests in spring? I have no problem binding single worded parameters doing this: Uri example: http://localhost:8080/test/?product=hotels public class CitiesRequest{ private ProductType product; public ProductType getProduct() { return this.product; } public void setProduct(String product) { this.product = product; } } But I'd like to be able to receive parameters like this: http://localhost:8080/test/?product-type=hotels 回答1: