siesta

Configure request method for a Siesta resource

隐身守侯 提交于 2019-12-09 07:59:09
问题 I have this api where the login works via post while most other requests work with get. Now I am using siesta to define the login url as a resource. func login(username: String, password: String) -> Resource { return self.resource("login").withParam("username", username).withParam("password", password); } The problem is that when I use .loadIfNeeded() on this resource it will do a get request, but that won't work because it needs to be a post request. Now I know of the existence of

Configure request method for a Siesta resource

妖精的绣舞 提交于 2019-12-03 09:15:52
I have this api where the login works via post while most other requests work with get. Now I am using siesta to define the login url as a resource. func login(username: String, password: String) -> Resource { return self.resource("login").withParam("username", username).withParam("password", password); } The problem is that when I use .loadIfNeeded() on this resource it will do a get request, but that won't work because it needs to be a post request. Now I know of the existence of .decorateRequests, but I'm unsure how to use that to make my login resource use post as request method. Thanks in

How to create a WAR file using the commandline?

不羁岁月 提交于 2019-11-29 13:19:12
I installed JBoss Developer Studio and it's possible to create a WAR file by "right mouse project > Export > WAR file" but I want to export my project to a WAR file using the commandline. I have maven installed which is one of the requirements of the Studio and I read that I can generate a WAR file using maven but I require a file called pom.xml. When I searched through my workspace and project, pom.xml was missing. I may need to manually create pom.xml but I'm unsure how to. My directory tree for my project is the following: Siesta ├── build │ └── classes ├── src └── WebContent ├── extjs ├──

How to create a WAR file using the commandline?

让人想犯罪 __ 提交于 2019-11-28 07:08:10
问题 I installed JBoss Developer Studio and it's possible to create a WAR file by "right mouse project > Export > WAR file" but I want to export my project to a WAR file using the commandline. I have maven installed which is one of the requirements of the Studio and I read that I can generate a WAR file using maven but I require a file called pom.xml. When I searched through my workspace and project, pom.xml was missing. I may need to manually create pom.xml but I'm unsure how to. My directory