Var denne side nyttig?
Din feedback på dette indhold er vigtigt. Giv os din mening.
Mere feedback?
1500 tegn tilbage
Eksportér (0) Udskriv
Udvid alt
EN
Dette indhold er ikke tilgængeligt på dit sprog, men her er den engelske version.

statusCodes object

Updated: February 25, 2015

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

This object contains the following members:

 

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();
    }
}

Vis:
© 2015 Microsoft