Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Implement POST, PUT request parameters parsing driven by media types

#13

Rails already offer a way to set a media type parameter parsing scheme, as the documentation shows:

# Assign a new param parser to a new content type ActionController::Base.param_parsers['application/atom+xml'] = Proc.new do |data|

node = REXML::Document.new(post)

{ node.root.name => node.root } end

Therefore, Restfulie must implement a way to enable the user to set specific media types and also support the common ones.

Rails already support XML, JSON and YAML. This feature should also include atom+xml.

Reported by Guilherme Silveira · April 3rd, 2010 @ 10:12 PM

State: resolved
Milestone: v0.7
Assigned to: Cipriani Cipriani

Activity

  1. Cipriani
    Cipriani
    • State changed from new to resolved

    is on the master branch

    April 7th, 2010 @ 02:35 PM

  2. Guilherme Silveira
    Guilherme Silveira
    • State changed from resolved to open

    Currently not accepting requests without parameters. How to reproduce it:

    rails xpto
    cd xpto
    script/generate controller entries
    script/server
    vi config/enviroment.rb

    config.gem 'restfulie', :version => '0.7'

    vi app/controllers/entries_controller.rb

    def index

    render :text => 'hi'

    end

    curl http://localhost:3000/entries

    April 7th, 2010 @ 03:30 PM

  3. Cipriani
    Cipriani
    • State changed from open to resolved

    it's fixed. The behavior now is: every request that came with certain media type not registered in Restfulie and has entity body length greater than zero, it will generate 415 code

    April 7th, 2010 @ 04:21 PM

  4. Guilherme Silveira
    Guilherme Silveira
    • State changed from resolved to open

    It was missing a check for env["CONTENT_LENGTH"] existence.

    April 8th, 2010 @ 11:22 AM

  5. Guilherme Silveira

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.