restful-url

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

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

Avoiding the endless loop in JSP servlet mapping

若如初见. 提交于 2019-12-23 03:13:14
问题 I've got this issue, recently I read about the REST arquitecture and it makes a perfect sense, so I'd like to achieve a RESTful web application. Now, I'm following the Front Controller pattern that means that all of the URL mappings go to the controller.java servlet, I map the by specific URLs, not by using the /* wildcard, the controller implements the four HTTP methods POST , GET , PUT , DELETE , each method calls the controllers service method and there I determine based on the

Nested Routes and Parameters for Rails URLs (Best Practice)

只谈情不闲聊 提交于 2019-12-22 15:02:16
问题 I have a decent understanding of RESTful urls and all the theory behind not nesting urls, but I'm still not quite sure how this looks in an enterprise application, like something like Amazon, StackOverflow, or Google... Google has urls like this: http://code.google.com/apis/ajax/ http://code.google.com/apis/maps/documentation/staticmaps/ https://www.google.com/calendar/render?tab=mc Amazon like this: http://www.amazon.com/books-used-books-textbooks/b/ref=sa_menu_bo0?ie=UTF8&node=283155&pf_rd

HTTP 400 Bad Request : javax.ws.rs.BadRequestException

你。 提交于 2019-12-22 12:23:53
问题 I create a RESTful web service and write a client to use it . but when I run it i take HTTP 400 Bad Request : javax.ws.rs.BadRequestException exeption . this is my client code : String webserviceURI = "http://localhost:8084/fsc-access"; ClientConfig clientConfig = new ClientConfig(); Client client = ClientBuilder.newClient(clientConfig); URI serviceURI = UriBuilder.fromUri(webserviceURI).build(); WebTarget webTarget = client.target(serviceURI); MultivaluedMap formData = new MultivaluedMapImpl

Simple REST URL scheme

一曲冷凌霜 提交于 2019-12-22 10:26:35
问题 In my web app I've got a user model and a journal and post model. Each user can have multiple journals, each journal can have multiple posts. Is below the best way to represent this in a RESTful way? /profiles/<username> /profiles/<username>/journals/<journal_id> /profiles/<username>/journals/<journal_id>/posts/<post_id> or would: /profiles/<username> /journals/<journal_id> be a better way to go? 回答1: You have three types of resources: Profiles, Journals, and Posts. If your business needs is

How to handle huge data from a REST service

廉价感情. 提交于 2019-12-22 05:19:34
问题 We are using a REST service that returns huge data. In production, the server hardware can handle it. I need to test the REST service by getting the data on my local machine, which cannot handle the huge data. My local machine is a 4G i5. I am getting out of memory exception every time I hit the service. response.getStatus() returns 200 status. But while collecting the data using input stream reader, I get an out of memory exception. BufferedReader br = new BufferedReader(new

Best practices on using URIs as parameter value in REST calls

こ雲淡風輕ζ 提交于 2019-12-22 04:38:31
问题 I am designing a REST API where some resources can be filtered through query parameters. In some cases, these filter values would be resources from the same REST API. This makes for longish and pretty unreadable URIs. While this is not too much of a problem in itself because the URIs are meant to be created and manipulated programmatically, it makes for some painful debugging. I was thinking of allowing shortcuts to URIs used as filter values and I wonder if this is allowed according to the

Rails RESTful URL's: All Posts under certain Category

≡放荡痞女 提交于 2019-12-21 22:20:18
问题 Currently I use my posts#index action to show all posts or filter'em by category in case its specified: PostsController: def index @posts = Post.all(:order => "created_at DESC") @posts = @posts.by_category(params[:category_id]) #Custom named_scope end Routes: map.connect '/post/by_category/:category_id', :controller => :posts, :action => :index map.resources :users So /posts will return all the posts , and /posts/by_category/1 will return all posts under category 1 I wonder if there is a way

Should I provide parent resource name in URL or not in RESTful WS?

回眸只為那壹抹淺笑 提交于 2019-12-21 21:08:20
问题 I am developing some basic restful web services using PHP and apache and I am wondering whether I should build the URLs providing the parent entity name or not. Let me explain this better: I have 2 entities, lets suppose countries and cities . I am now just providing WS to get, create, update or delete cities but the API won't support countries manipulation via WS. I am remapping urls using mod_rewrite and I am providing the following urls in the api to manipulate cities: . GET /api/countries