Search Results

Search found 752 results on 31 pages for 'restful'.

Page 18/31 | < Previous Page | 14 15 16 17 18 19 20 21 22 23 24 25  | Next Page >

  • rails declarative authorization, permit all actions for controller?

    - by SooDesuNe
    using the delcarative_authorization gem for rails, is there a shortcut to allow a role access to all controller actions? privileges do # default privilege hierarchies to facilitate RESTful Rails apps privilege :manage, :includes => [:create, :read, :update, :delete] end isn't sufficient, because I have more controlling methods than just CRUD in my controllers. Something like: role :foo do has_permission_on :bar, :to =>[:all] end would be perfect, but I'm not finding it in the docs.

    Read the article

  • How to inject ServletContext for JUnit tests with Spring?

    - by Juri Glass
    Hi I want to unit test a RESTful interface written with Apache CXF. I use a ServletContext to load some resources, so I have: @Context private ServletContext servletContext; If I deploy this on Glassfish, the ServletContext is injected and it works like expected. But I don't know how to inject the ServletContext in my service class, so that I can test it with a JUnit test. I use Spring 3.0, JUnit 4, CXF 2.2.3 and Maven.

    Read the article

  • What is the proper HTTP response to send for requests that require SSL

    - by dasil003
    I'm designing an RESTful API where some calls are public over HTTP, and some require an API key and encryption over HTTPS. I'm deliberating on what response code should be sent if an HTTP request is sent to one of the private resources. So far the only one that jumps out at me is 412 - Precondition Failed, but the standard indicates that the precondition is imposed by the requester not the server. Is there an appropriate response code for this condition or do I just need to give in and do 400?

    Read the article

  • url optimization in rails?

    - by piemesons
    Hello I want to create seo optimize url in rails.Same like done in stackoverflow. Right now this is my url http://localhost:3000/questions/56 I want to make it something like this:- http://localhost:3000/questions/56/this-is-my-optimized-url i am using restful approach. is there any plug-in available for this.

    Read the article

  • Rails learn's confusion

    - by Steve
    This is a beginner's rails learning confusion. When I learn rails, from time to time, I feel frustrated on rails' principle "Convention over Configuration". Rails uses heavily on conventions. A lot of them are just naming conventions. If I forget a convention, I will either use the wrong naming and get unexpected result or get things magically done but don't understand how. Sometimes, I think of configuration. At least configuration lists everything clearly and nothing is in fog. In rails, there seems a hidden, dark contract between you and the machine. If you follow the contract, you communicate well. But a beginner usually forgets items listed on the contract and this usually leads to confusion. That's why when I first pick up rails, I feel like it is somehow difficult to learn. Besides, there are many other things that could be new to a learner, such as using git, using plugins from community, using RESTful routing style, using RSpec. All these are new and come together in learning ruby and rails. This definitely adds up difficulties for a beginner. In contrast, if you learn php, it wouldn't be that bad. You can forget many things and focus on learning php itself. You don't need to learn database handling if you know SQL already(in rails, you need to learn a whole new concept migration), you don't have to learn a new decent unit test(in rails, usually they teach RSpec along the way because rails is agile and you should learn test-driven development in the early learning stage), you don't have to learn a new version control(in rails, you will be taught about git anyway), you don't have to use complicated plugins(in rails, they usually use third-party plugins in textbook examples! what the hell? why not teach how to do a simplified similar thing in rails?), you don't have to worry RESTful style. All in all, when I learn php, I learn it quick and soon I start to write things myself. Learning php is similar to learning C/java. It tastes like those traditional languages. When I learn rails, it is more difficult. And I need to learn ruby as well (I believe many of you learn ruby just because of rails). Does anyone have the similar feeling as I have? How do you overcome it and start to master rails? Hints will be welcomed. Thank you.

    Read the article

  • Does mcrypt support asymmetric encryption?

    - by bryanagee
    I want to use asymmetric encryption of headers in RESTful requests to verify the identity of the system sending the request: i e System A encrypts it's name, timestamp, and the service name using it's public key in a request to System B. System B then uses the public key of System A to decrypt, proving the authenticity of the request. 1) Does php-mcrypt support this? 2) Has anyone benchmarked this type of operation?

    Read the article

  • Rails routes matching query parameters

    - by Harry Wood
    Rails routes are great for matching RESTful style '/' separated bits of a URL, but can I match query parameters in a map.connect config. I want different controllers/actions to be invoked depending on the presence of a parameter after the '?'. I was trying something like this... map.connect "api/my/path?apple=:applecode", :controller = 'apples_controller', :action = 'my_action' map.connect "api/my/path?banana=:bananacode", :controller = 'bananas_controller', :action = 'my_action' For routing purposes I don't care about the value of the parameter, as long as it is available to the controller in the 'params' hash

    Read the article

  • Using the Jersey client to do a POST operation

    - by Jon
    Hello, In a Java method, I'd like to use a Jersey client object to do a POST operation on a RESTful web service (also written using Jersey) but am not sure how to use the client to send the values that will be used as FormParam's on the server. I'm able to send query params just fine. Thanks in advance.

    Read the article

  • Encrypt/ Secure communication Android app <-> REST webservice

    - by Ascorbin
    I want to create a backend for my android app with Tapestry5 and this http://code.google.com/p/t5-restful-webservices/ plugin. The app will communicate with the server by calling REST methods both for registered users (that would be easy to secure I guess) as well as unregistered users. Now of course I don't want people to just call that webservice from a browser. How can I make sure that only my app can make calls to this backend?

    Read the article

  • Easy XML Serializer for Java

    - by sdoca
    I'm looking for a way to serialize Java objects into XML for use by a RESTful web service. I don't have an XSD. I have looked at the following: JAXB - fairly heavy weight with annotations required on classes and also an ObjectFactory class and/or a jaxb.index file Simple - requires annotations but no other config classes/files. Unfortunately it can't serialize Sets. XStream - no annotations etc. required, but doesn't support generics Does anyone else have any suggestions?

    Read the article

  • RESTfully request sub-parts of a representation be of a certain content-type

    - by Grayside
    I am requesting (via Accept: application/json) that an API I'm designing respond as JSON. However, I want the values within that JSON to be specified to conform to text/plain or text/html depending on the capabilities of the client. What is the RESTful best practice for a "sub-type"? How would this work if I formally switched to HAL as the top-level container? Accept: application/json+text/plain { "value": "Hello World" } Accept: application/json+text/html { "value": "<h2>Hello World</h2>" }

    Read the article

  • SOA, unobtrusive JavaScript

    - by csetzkorn
    Hi, Let us say I have a restful web service which can deal with DTOs in json format to perform a CRUD operation. Let us also say I use jquery in an unobtrusive way to serialise my form at the frontend using: JSON.stringify What can I do to ensure that everything works even if JavaScript is switched off? Thanks. Best wishes, Christian

    Read the article

  • All permissions with declarative_authorization

    - by pablorc
    Hi, I have a Rails application using Restful authentication and declarative authorization. I have some roles with an admin. Is there any method to have automatically granted all permissions to this role, instead of hardcode every controller in the authorization_rules? Something like: role :admin do has_permission_on :everything, :to => :manage end Or a uglier approach with introspection, maybe? Thanks in advance

    Read the article

  • Custom formats in Ruby on Rails

    - by Koning Baard XIV
    I'm creating a website in Ruby on Rails, where users can login using RESTful Authentication. Someone can get a specific user using html, xml and json, just like scaffolding. But I want to add one more format: vCard (e.g. /users/1.vcard). This has a specific format, but how do I define my own formats? Using views, or must I use another way? Thanks

    Read the article

  • Java application on windows server possibility?

    - by Shawn Mclean
    I'd like to know if it is possible to have this application (neo4j) running on windows server 2008 alongside an asp.net mvc application. Reason for this, I need to access the graph database (neo4j) which provides a RESTful service from my mvc application. How would I go about setting up this architecture?

    Read the article

  • Using routing (?) to make GET request in Rails so ID doesn't show

    - by ale
    I have a link in one view myapp/locations that goes to myapp/statistics?id=1 (statistics for location with ID 1) which works fine but it doesn't look pretty. I think I've seen people do this sort of thing without needing the ?id=1? I could use a POST but this is not RESTful. Is there a way I can use routing to allow the user to go to myapp/statistics?id=1 but have the user see myapp/statistics? Many thanks.

    Read the article

< Previous Page | 14 15 16 17 18 19 20 21 22 23 24 25  | Next Page >