 Falcon v3.0.0 Documentation' 'as part of the request.') raise falcon.HTTPUnauthorized(title='Auth token required', description=description, 'Please request a new token and try again.') raise falcon.HTTPUnauthorized(title='Authentication required', description=description, not in req.content_type: raise falcon.HTTPUnsupportedMediaType( title='This API only supports requests encoded as JSON.', href='http://docs.examples0 码力 | 1055 页 | 739.30 KB | 1 年前3 Falcon v3.0.0 Documentation' 'as part of the request.') raise falcon.HTTPUnauthorized(title='Auth token required', description=description, 'Please request a new token and try again.') raise falcon.HTTPUnauthorized(title='Authentication required', description=description, not in req.content_type: raise falcon.HTTPUnsupportedMediaType( title='This API only supports requests encoded as JSON.', href='http://docs.examples0 码力 | 1055 页 | 739.30 KB | 1 年前3
 Falcon v3.0.1 Documentation' 'as part of the request.') raise falcon.HTTPUnauthorized(title='Auth token required', description=description, 'Please request a new token and try again.') raise falcon.HTTPUnauthorized(title='Authentication required', description=description, not in req.content_type: raise falcon.HTTPUnsupportedMediaType( title='This API only supports requests encoded as JSON.', href='http://docs.examples0 码力 | 1058 页 | 741.59 KB | 1 年前3 Falcon v3.0.1 Documentation' 'as part of the request.') raise falcon.HTTPUnauthorized(title='Auth token required', description=description, 'Please request a new token and try again.') raise falcon.HTTPUnauthorized(title='Authentication required', description=description, not in req.content_type: raise falcon.HTTPUnsupportedMediaType( title='This API only supports requests encoded as JSON.', href='http://docs.examples0 码力 | 1058 页 | 741.59 KB | 1 年前3
 Falcon v3.0.0-b1 Documentation' 'as part of the request.') raise falcon.HTTPUnauthorized(title='Auth token required', description=description, 'Please request a new token and try again.') raise falcon.HTTPUnauthorized(title='Authentication required', description=description, not in req.content_type: raise falcon.HTTPUnsupportedMediaType( title='This API only supports requests encoded as JSON.', href='http://docs.examples0 码力 | 1028 页 | 725.86 KB | 1 年前3 Falcon v3.0.0-b1 Documentation' 'as part of the request.') raise falcon.HTTPUnauthorized(title='Auth token required', description=description, 'Please request a new token and try again.') raise falcon.HTTPUnauthorized(title='Authentication required', description=description, not in req.content_type: raise falcon.HTTPUnsupportedMediaType( title='This API only supports requests encoded as JSON.', href='http://docs.examples0 码力 | 1028 页 | 725.86 KB | 1 年前3
 Falcon v3.0.0-b2 Documentation' 'as part of the request.') raise falcon.HTTPUnauthorized(title='Auth token required', description=description, 'Please request a new token and try again.') raise falcon.HTTPUnauthorized(title='Authentication required', description=description, not in req.content_type: raise falcon.HTTPUnsupportedMediaType( title='This API only supports requests encoded as JSON.', href='http://docs.examples0 码力 | 1041 页 | 730.21 KB | 1 年前3 Falcon v3.0.0-b2 Documentation' 'as part of the request.') raise falcon.HTTPUnauthorized(title='Auth token required', description=description, 'Please request a new token and try again.') raise falcon.HTTPUnauthorized(title='Authentication required', description=description, not in req.content_type: raise falcon.HTTPUnsupportedMediaType( title='This API only supports requests encoded as JSON.', href='http://docs.examples0 码力 | 1041 页 | 730.21 KB | 1 年前3
 Falcon v1.0.0 Documentationto read more bytes than are expected (as determined by the Content-Length header) may or may not block indefinitely. It’s a good idea to test your WSGI server to find out how it behaves. This can be particulary verbose: # If Content-Length happens to be 0, or the header is # missing altogether, this will not block. data = req.stream.read(req.content_length or 0) Alternatively, when passing the stream directly the body, and will never block on out-of-bounds reads, assuming the client does not stall while transmitting the data to the server. For example, the following will not block when Content-Length is 00 码力 | 312 页 | 368.58 KB | 1 年前3 Falcon v1.0.0 Documentationto read more bytes than are expected (as determined by the Content-Length header) may or may not block indefinitely. It’s a good idea to test your WSGI server to find out how it behaves. This can be particulary verbose: # If Content-Length happens to be 0, or the header is # missing altogether, this will not block. data = req.stream.read(req.content_length or 0) Alternatively, when passing the stream directly the body, and will never block on out-of-bounds reads, assuming the client does not stall while transmitting the data to the server. For example, the following will not block when Content-Length is 00 码力 | 312 页 | 368.58 KB | 1 年前3
 Falcon v3.0.0-b2 Documentationdescription = ('Please provide an auth token ' 'as part of the request.') raise falcon.HTTPUnauthorized(title='Auth token required', description=description, challenges=challenges, href='http://docs.example.com/auth') token is not valid. ' 'Please request a new token and try again.') raise falcon.HTTPUnauthorized(title='Authentication required', description=description, challenges=challenges, href='http://docs.example 'PUT'): if 'application/json' not in req.content_type: raise falcon.HTTPUnsupportedMediaType( title='This API only supports requests encoded as JSON.', href='http://docs.examples.com/api/json') class0 码力 | 340 页 | 1.15 MB | 1 年前3 Falcon v3.0.0-b2 Documentationdescription = ('Please provide an auth token ' 'as part of the request.') raise falcon.HTTPUnauthorized(title='Auth token required', description=description, challenges=challenges, href='http://docs.example.com/auth') token is not valid. ' 'Please request a new token and try again.') raise falcon.HTTPUnauthorized(title='Authentication required', description=description, challenges=challenges, href='http://docs.example 'PUT'): if 'application/json' not in req.content_type: raise falcon.HTTPUnsupportedMediaType( title='This API only supports requests encoded as JSON.', href='http://docs.examples.com/api/json') class0 码力 | 340 页 | 1.15 MB | 1 年前3
 Falcon v3.0.0 Documentationdescription = ('Please provide an auth token ' 'as part of the request.') raise falcon.HTTPUnauthorized(title='Auth token required', description=description, challenges=challenges, href='http://docs.example.com/auth') token is not valid. ' 'Please request a new token and try again.') raise falcon.HTTPUnauthorized(title='Authentication required', description=description, challenges=challenges, href='http://docs.example 'PUT'): if 'application/json' not in req.content_type: raise falcon.HTTPUnsupportedMediaType( title='This API only supports requests encoded as JSON.', href='http://docs.examples.com/api/json') class0 码力 | 344 页 | 1.16 MB | 1 年前3 Falcon v3.0.0 Documentationdescription = ('Please provide an auth token ' 'as part of the request.') raise falcon.HTTPUnauthorized(title='Auth token required', description=description, challenges=challenges, href='http://docs.example.com/auth') token is not valid. ' 'Please request a new token and try again.') raise falcon.HTTPUnauthorized(title='Authentication required', description=description, challenges=challenges, href='http://docs.example 'PUT'): if 'application/json' not in req.content_type: raise falcon.HTTPUnsupportedMediaType( title='This API only supports requests encoded as JSON.', href='http://docs.examples.com/api/json') class0 码力 | 344 页 | 1.16 MB | 1 年前3
 Falcon v3.0.1 Documentationdescription = ('Please provide an auth token ' 'as part of the request.') raise falcon.HTTPUnauthorized(title='Auth token required', description=description, challenges=challenges, href='http://docs.example.com/auth') token is not valid. ' 'Please request a new token and try again.') raise falcon.HTTPUnauthorized(title='Authentication required', description=description, challenges=challenges, href='http://docs.example 'PUT'): if 'application/json' not in req.content_type: raise falcon.HTTPUnsupportedMediaType( title='This API only supports requests encoded as JSON.', href='http://docs.examples.com/api/json') class0 码力 | 344 页 | 1.16 MB | 1 年前3 Falcon v3.0.1 Documentationdescription = ('Please provide an auth token ' 'as part of the request.') raise falcon.HTTPUnauthorized(title='Auth token required', description=description, challenges=challenges, href='http://docs.example.com/auth') token is not valid. ' 'Please request a new token and try again.') raise falcon.HTTPUnauthorized(title='Authentication required', description=description, challenges=challenges, href='http://docs.example 'PUT'): if 'application/json' not in req.content_type: raise falcon.HTTPUnsupportedMediaType( title='This API only supports requests encoded as JSON.', href='http://docs.examples.com/api/json') class0 码力 | 344 页 | 1.16 MB | 1 年前3
 Falcon v3.0.0-b1 Documentationdescription = ('Please provide an auth token ' 'as part of the request.') raise falcon.HTTPUnauthorized(title='Auth token required', description=description, challenges=challenges, href='http://docs.example.com/auth') token is not valid. ' 'Please request a new token and try again.') raise falcon.HTTPUnauthorized(title='Authentication required', description=description, challenges=challenges, href='http://docs.example 'PUT'): if 'application/json' not in req.content_type: raise falcon.HTTPUnsupportedMediaType( title='This API only supports requests encoded as JSON.', href='http://docs.examples.com/api/json') class0 码力 | 338 页 | 1.14 MB | 1 年前3 Falcon v3.0.0-b1 Documentationdescription = ('Please provide an auth token ' 'as part of the request.') raise falcon.HTTPUnauthorized(title='Auth token required', description=description, challenges=challenges, href='http://docs.example.com/auth') token is not valid. ' 'Please request a new token and try again.') raise falcon.HTTPUnauthorized(title='Authentication required', description=description, challenges=challenges, href='http://docs.example 'PUT'): if 'application/json' not in req.content_type: raise falcon.HTTPUnsupportedMediaType( title='This API only supports requests encoded as JSON.', href='http://docs.examples.com/api/json') class0 码力 | 338 页 | 1.14 MB | 1 年前3
 Falcon v0.2.0 DocumentationEither a file-like object with a read() method that takes an optional size argument and returns a block of bytes, or an iterable object, representing response content, and yielding blocks as byte strings objects. stream_len int – Expected length of stream (e.g., file size). add_link(target, rel, title=None, title_star=None, anchor=None, hreflang=None, type_hint=None)[source] Add a link header to the response relation types. Kwargs: title (str): Human-readable label for the destination of the link (default None). If the title includes non-ASCII characters, you will need to use title_star instead, or provide0 码力 | 188 页 | 358.44 KB | 1 年前3 Falcon v0.2.0 DocumentationEither a file-like object with a read() method that takes an optional size argument and returns a block of bytes, or an iterable object, representing response content, and yielding blocks as byte strings objects. stream_len int – Expected length of stream (e.g., file size). add_link(target, rel, title=None, title_star=None, anchor=None, hreflang=None, type_hint=None)[source] Add a link header to the response relation types. Kwargs: title (str): Human-readable label for the destination of the link (default None). If the title includes non-ASCII characters, you will need to use title_star instead, or provide0 码力 | 188 页 | 358.44 KB | 1 年前3
共 40 条
- 1
- 2
- 3
- 4














