HomePhorge

(#21427) Respect Accept header for save
7915997cbe6eUnpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

(#21427) Respect Accept header for save

The REST save action will now respect the formats that are requested in
the Accept header. In order to retain backwards compatibility for
clients that have never been required to specify an Accept before this
it will also default to :yaml when no Accept is provided. If an Accept
is provided but none of the wanted formats are suitable an error is
raised, just like find and search.

In order to report the status of an unkown Accept header correctly this
also adds the capability of raising web related exceptions that contain
the HTTP response code that needs to be used.

Details

Provenance
Andrew Parker <andy@puppetlabs.com>Authored on
vanmeeuwenPushed on Jun 2 2015, 2:22 PM
Parents
rPU08d7f8b5a1d9: (Maint) Cleanup do_save specs
Branches
Unknown
Tags
Unknown

Event Timeline

Andrew Parker <andy@puppetlabs.com> committed rPU7915997cbe6e: (#21427) Respect Accept header for save (authored by Andrew Parker <andy@puppetlabs.com>).Jun 26 2013, 1:47 AM