restful-architecture

RESTful API: Should I send URI parts in the response body? And how about Updating them? [closed]

倾然丶 夕夏残阳落幕 提交于 2019-12-24 11:35:04
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 5 years ago . I am building a RESTful API and I am not sure whether it is a problem (and violation of REST) to send information that is the same as URI parts in the response body or not. Current Situation An GET /element/$ID call gets you data of this element from the database, which also

RESTful web services and Struts 2

北城余情 提交于 2019-12-24 08:38:50
问题 We are evaluating one design for educational activity. We would like to create complete backend (which handles business logic) in form of RESTful web services. These services can be used by various apps. Is it good idea to call these web services from Struts2 framework? I read couple of docs, and people discourage it. We would love to go with Struts2 as team is quite strong on it. But if its bad approach, we may consider for other options. 回答1: If you want to leverage development on

In soap there is WSDL for communication but in rest what is there ?

断了今生、忘了曾经 提交于 2019-12-24 07:06:19
问题 In SOAP there is WSDL for communication. I read in blogs that WSDL 2.0 supports REST but it is not properly define the REST so is there any equivalent for REST ? I'm doing communication using JSON data between client and server so i need something that properly fit for communication so is there is something for this ? 回答1: There are different proposals in the industry, such as WADL (see http://en.wikipedia.org/wiki/Web_Application_Description_Language ), but unfortunately there is no commonly

How are URI's handled in a REST api?

纵然是瞬间 提交于 2019-12-24 06:58:16
问题 I'm creating a hobby iOS app, and I'm a bit confused about how to create a REST backend for it. I've read the resources available on the internet and I understand the theories behind REST. However, I'm confused about how the URI's get handled. For instance, is there a file handling rest functions at /resource/ or /resource/{id} or are these files sitting at root, and somehow the URI calls are getting routed to them? Excuse my ignorance at web design. 回答1: That depends on the server

Java Jersey RESTful web service using https

∥☆過路亽.° 提交于 2019-12-23 16:15:37
问题 I am new to Java EE and I am developing a RESTful api in wich every api call the user sends encoded credentials. My problem is how to implement https protocol over default http and make my connection secure. I am using Jersey restful web services and Glassfish web server. Thanks. 回答1: That's more a setup/configuration question, isn't it? You use HTTPS (TLS) because you set it up in your server, then your REST endpoint will be used/changed accordingly...and the (encoded) credentials can be

RESTFull Architecture HTTP GET & PUT Requests [closed]

旧时模样 提交于 2019-12-23 06:08:19
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . Could anybody point me to a tutorial, examples or docs about http request, GET, PUT. I need to put & get a JSON package to & from a URL. Cant find much objective-c information about receiving JSONs from a HTTP request. Any help is appreciated. 回答1: Using AFnetworking Would best Idea. here is the following

Examples on Zend_Rest_Controller Unit Testing

我们两清 提交于 2019-12-23 03:22:23
问题 I have found a bunch of examples how to unit test Zend_Controller, but I'm looking for examples on Zend_Rest_Controller Unit Testing. Any help is really appreciated. Thank you! 回答1: So, basically your question is how to emulate calling PUT and DELETE in your controller tests? Since this apparently doesn't work: $this->request->setMethod('PUT'); You can access both these actions with plain HTTP POST by providing _method parameter. So to call PUT : $this->request->setMethod('POST'); $this-

Sharing state between sibling components with routes

旧城冷巷雨未停 提交于 2019-12-22 14:46:08
问题 I am building a small application with the intention of learning some design principles (api/data structure) along with new frameworks and languages, specifically ReactJS w/ Redux on the Frontend and Golang on the backend (restful API). I am struggling with how I should structure components and routes, along with my API, based on the react container component way of thinking in which single responsibility principle is followed. As Let's say I have two objects types, Companies and Houses which

rest - relation context

[亡魂溺海] 提交于 2019-12-22 08:21:14
问题 Say I have two collection resources: /persons /organizations A GET to /persons/id/ returns a specific person. Likewise, a GET to /organizations/id returns a specific organization. A person can be member of one or more organizations. In this relation context, we have data such as the role of the person in the organization, the date on which the person joined the organization, ... Which of the designs make most sense? A membership resource /memberships/id , to which a GET returns the data of

REST API for Redshift

懵懂的女人 提交于 2019-12-22 06:46:22
问题 I'm currently brainstorming an idea and trying to figure out whether it's feasible or a better way to handle this approach. Assume I have a Redshift table and I want to expose this table through a REST API. For example, there are several customer who needs some kind of meta data from this table. They will call a REST service and it will execute on the Redshift to get the data and will response to the client in JSON format. I'm fairly new in Redshift/AWS area so not sure whether AWS already