EN
このコンテンツは設定された言語で表示できません。英語版のページが表示されます。
このトピックはまだ評価されていません - このトピックを評価する

statusCodes object

[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

The feature described in this topic is available only in preview. To use this feature and other new Windows Azure capabilities, sign up for the free preview.


Enumerates the supported HTTP status codes can be returned by Windows Azure Mobile Services.

This object contains the following members:

Properties

 

Member Code

OK

200

CREATED

201

ACCEPTED

202

NO_CONTENT

204

BAD_REQUEST

400

UNAUTHORIZED

401

FORBIDDEN

403

NOT_FOUND

404

CONFLICT

409

INTERNAL_SERVER_ERROR

500

Use the statusCodes object to specify the status code when you call the respond method on the Request object.

function insert(item, user, request) {
    if (item.userid !== user.userId) {
        request.respond(statusCodes.FORBIDDEN, 
        'You may only insert records with your userid.');
    } else {
        request.execute();
    }
}

この情報は役に立ちましたか。
(残り 1500 文字)
© 2013 Microsoft. All rights reserved.
facebook page visit twitter rss feed newsletter