Click or drag to resize
ResourceHints Class
This API is preliminary and subject to change.
This class models the Resource Hints of the home document described by Home Documents for HTTP APIs.
Inheritance Hierarchy

Namespace: net.openstack.Core.Domain
Assembly: openstacknet (in openstacknet.dll) Version: 1.7.7+Branch.master.Sha.25d803f397c8693c2c13777ef6675f796f520f2c
Syntax
[JsonObjectAttribute(MemberSerialization.OptIn)]
public class ResourceHints : ExtensibleJsonObject

The ResourceHints type exposes the following members.

Constructors
  NameDescription
Public methodResourceHints
Initializes a new instance of the ResourceHints class
Top
Properties
  NameDescription
Public propertyAcceptPatch
Gets the PATCH request formats accepted by the resource for this client; equivalent to the Accept-Patch HTTP response header.
Public propertyAcceptPost
Gets the POST request formats accepted by the resource for this client.
Public propertyAcceptPut
Gets the PUT request formats accepted by the resource for this client.
Public propertyAcceptRanges
Gets the range-specifiers available to the client for this resource; equivalent to the Accept-Ranges HTTP response header.
Public propertyAllow
Gets the HTTP methods that the current client will be able to use to interact with the resource; equivalent to the Allow HTTP response header.
Public propertyAuthenticationRequirements
Gets a collection of requirements for authentication using the HTTP Authentication Framework.
Public propertyDocs
Gets the location for human-readable documentation for the relation type of the resource.
Public propertyExtensionData
Gets a map of object properties which did not map to another field or property during JSON deserialization. The keys of the map represent the property names, and the values are JToken instances containing the parsed JSON values.
(Inherited from ExtensibleJsonObject.)
Public propertyFormats
Gets the representation types that the resource produces and consumes, using the GET and PUT methods respectively, subject to the Allow hint. The keys of this collections are media types, and the values are objects which have not yet been defined.
Public propertyPreconditions
Gets a collection of preconditions that the resource may require for state-changing requests (e.g., PUT, PATCH) to include a precondition, to avoid conflicts due to concurrent updates.
Public propertyPrefer
Gets the preferences supported by the resource. Note that, as per that specification, a preference can be ignored by the server.
Public propertyStatus
Gets the status of the resource. Possible values for the status are "deprecated" and "gone".
Top
Remarks
Resource hints allow clients to find relevant information about interacting with a resource beforehand, as a means of optimizing communications, as well as advertising available behaviors (e.g., to aid in laying out a user interface for consuming the API).

Hints are just that - they are not a "contract", and are to only be taken as advisory. The runtime behavior of the resource always overrides hinted information.

For example, a resource might hint that the PUT method is allowed on all "widget" resources. This means that generally, the user has the ability to PUT to a particular resource, but a specific resource could reject a PUT based upon access control or other considerations. More fine-grained information might be gathered by interacting with the resource (e.g., via a GET), or by another resource "containing" it (such as a "widgets" collection).

The current specification defines a set of common hints, based upon information that's discoverable by directly interacting with resources. A future draft will explain how to define new hints.

Version Information

.NET Framework

Supported in: 4.5

openstack.net

Supported in: 1.6, 1.5, 1.4, 1.3.6
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
See Also