jasy.http package

Submodules

jasy.http.Request module

jasy.http.Request.requestUrl(url, content_type='text/plain', headers=None, method='GET', port=None, body='', user=None, password=None)[source]

Generic HTTP request wrapper with support for basic authentification and automatic parsing of response content

jasy.http.Request.uploadData(url, fields, files, user=None, password=None, method='POST')[source]

Easy wrapper for uploading content via HTTP multi part

jasy.http.Server module

class jasy.http.Server.Proxy(id, config)[source]

Bases: builtins.object

default(*args, **query)[source]

This method returns the content of existing files on the file system. Query string might be used for cache busting and are otherwise ignored.

class jasy.http.Server.Result

Bases: builtins.tuple

Result(headers, content, status_code)

content

Alias for field number 1

headers

Alias for field number 0

status_code

Alias for field number 2

class jasy.http.Server.Server(port=8080, host='127.0.0.1', mimeTypes=None)[source]

Bases: builtins.object

Starts the built-in HTTP server inside the project’s root directory

setRoutes(routes)[source]

Adds the given routes to the server configuration. Routes can be used to add special top level entries to the different features of the integrated webserver either mirroring a remote server or delivering a local directory.

The parameters is a dict where every key is the name of the route and the value is the configuration of that route.

start()[source]

Starts the web server and blocks execution.

Note: This stops further execution of the current task or method.

class jasy.http.Server.Static(id, config, mimeTypes=None)[source]

Bases: builtins.object

default(*args, **query)[source]

This method returns the content of existing files on the file system. Query string might be used for cache busting and are otherwise ignored.

jasy.http.Server.enableCrossDomain()[source]
jasy.http.Server.findIndex(path)[source]
jasy.http.Server.noBodyProcess()[source]

Module contents

Table Of Contents

Previous topic

jasy.env package

Next topic

jasy.item package

This Page