How to Validate Web Forms
Useful Iterators and Methods for Ruby on Rails
How to Provide Feedback to Web Form Users

Accept Input to a Web Service

You can add the capability for your web services to accept input and then react based on that input, much like you'd do for a web form. For example, you might accept input to the date web service to convert a date into other formats, or you might accept a URL into the site status web service to check its status.

Prior to accepting input, you should understand a bit about two HyperText Transfer Protocol (HTTP) methods. HTTP methods are ways of interacting with a web server. Here are two primary methods used on the web:

  • GET: This request sends everything right along with the URL, and you see GET requests in the address bar of your web browser. GET requests are limited by web browsers to a certain length (the length varies depending on the browser).

  • POST: These requests send data as part of the data that gets sent to the server behind the scenes. POST requests are not limited by the web browser and are therefore appropriate for long forms or for sending large files through the web.

  • Add a Comment
  • Print
  • Share
blog comments powered by Disqus
Naming Conventions for Ruby on Rails
Secure PHP Applications with SuExec
How to Return Web Service Data from a Database
How to Validate Numbers in Web Form Fields
Ruby on Rails Keywords
Advertisement

Inside Dummies.com