The http-body Reference Manual

This is the http-body Reference Manual, version 0.1, generated automatically by Declt version 4.0 beta 2 "William Riker" on Mon Feb 26 16:41:44 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

The main system appears first, followed by any subsystem dependency.


2.1 http-body

HTTP POST data parser for Common Lisp

Author

Eitaro Fukamachi

License

BSD 2-Clause

Long Description

# HTTP-Body

[![Build Status](https://travis-ci.org/fukamachi/http-body.svg?branch=master)](https://travis-ci.org/fukamachi/http-body)

HTTP-Body parses HTTP POST data and returns POST parameters. It supports application/x-www-form-urlencoded, application/json, and multipart/form-data.

## Usage

‘http-body‘ package exports only a function ‘parse‘, which takes exact 2 arguments – a string of Content-Type and a stream of HTTP POST data.

“‘common-lisp
(http-body:parse "application/x-www-form-urlencoded"
body-stream)
;=> (("name" . "Eitaro"))
; T
“‘

It returns parsed parameters in an association list.

If the Content-Type of first argument isn’t supported, it returns ‘NIL‘.

“‘common-lisp
(http-body:parse "text/plain" body-stream)
;=> NIL
; NIL
“‘

## Installation

“‘common-lisp
(ql:quickload :http-body)
“‘

## Author

* Eitaro Fukamachi

## Copyright

Copyright (c) 2014 Eitaro Fukamachi

## License

Licensed under the BSD 2-Clause License.

Version

0.1

Dependencies
  • fast-http (system).
  • jonathan (system).
  • trivial-gray-streams (system).
  • quri (system).
  • flexi-streams (system).
  • babel (system).
  • cl-ppcre (system).
  • cl-utilities (system).
Source

http-body.asd.

Child Component

src (module).


3 Modules

Modules are listed depth-first from the system components tree.


3.1 http-body/src

Source

http-body.asd.

Parent Component

http-body (system).

Child Components

4 Files

Files are sorted by type and then listed depth-first from the systems components trees.


4.1 Lisp


4.1.1 http-body/http-body.asd

Source

http-body.asd.

Parent Component

http-body (system).

ASDF Systems

http-body.

Packages

http-body-asd.


4.1.2 http-body/src/http-body.lisp

Dependencies
Source

http-body.asd.

Parent Component

src (module).

Packages

http-body.

Public Interface

parse (function).

Internals

*content-type-map* (special variable).


4.1.3 http-body/src/multipart.lisp

Dependencies
Source

http-body.asd.

Parent Component

src (module).

Packages

http-body.multipart.

Public Interface

multipart-parse (function).


4.1.4 http-body/src/json.lisp

Dependency

util.lisp (file).

Source

http-body.asd.

Parent Component

src (module).

Packages

http-body.json.

Public Interface

json-parse (function).


4.1.5 http-body/src/urlencoded.lisp

Dependency

util.lisp (file).

Source

http-body.asd.

Parent Component

src (module).

Packages

http-body.urlencoded.

Public Interface

urlencoded-parse (function).


4.1.6 http-body/src/util.lisp

Source

http-body.asd.

Parent Component

src (module).

Packages

http-body.util.

Public Interface
Internals

parse-content-type (function).


5 Packages

Packages are listed by definition order.


5.1 http-body.json

Source

json.lisp.

Use List

common-lisp.

Public Interface

json-parse (function).


5.2 http-body.util

Source

util.lisp.

Use List

common-lisp.

Public Interface
Internals

parse-content-type (function).


5.3 http-body.urlencoded

Source

urlencoded.lisp.

Use List

common-lisp.

Public Interface

urlencoded-parse (function).


5.4 http-body

Source

http-body.lisp.

Use List

common-lisp.

Public Interface

parse (function).

Internals

*content-type-map* (special variable).


5.5 http-body-asd

Source

http-body.asd.

Use List
  • asdf/interface.
  • common-lisp.

5.6 http-body.multipart

Source

multipart.lisp.

Use List

common-lisp.

Public Interface

multipart-parse (function).


6 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


6.1 Public Interface


6.1.1 Ordinary functions

Function: detect-charset (content-type &optional default)
Package

http-body.util.

Source

util.lisp.

Function: json-parse (content-type content-length stream)
Package

http-body.json.

Source

json.lisp.

Function: multipart-parse (content-type content-length stream)
Package

http-body.multipart.

Source

multipart.lisp.

Function: parse (content-type content-length stream)
Package

http-body.

Source

http-body.lisp.

Function: slurp-stream (stream &optional content-length)
Package

http-body.util.

Source

util.lisp.

Function: starts-with (prefix string)
Package

http-body.util.

Source

util.lisp.

Function: urlencoded-parse (content-type content-length stream)
Package

http-body.urlencoded.

Source

urlencoded.lisp.


6.2 Internals


6.2.1 Special variables

Special Variable: *content-type-map*
Package

http-body.

Source

http-body.lisp.


6.2.2 Ordinary functions

Function: parse-content-type (content-type)
Package

http-body.util.

Source

util.lisp.


Appendix A Indexes


A.1 Concepts


A.3 Variables

Jump to:   *  
S  
Index Entry  Section

*
*content-type-map*: Private special variables

S
Special Variable, *content-type-map*: Private special variables


A.4 Data types

Jump to:   F   H   J   M   P   S   U  
Index Entry  Section

F
File, http-body.asd: The http-body/http-body․asd file
File, http-body.lisp: The http-body/src/http-body․lisp file
File, json.lisp: The http-body/src/json․lisp file
File, multipart.lisp: The http-body/src/multipart․lisp file
File, urlencoded.lisp: The http-body/src/urlencoded․lisp file
File, util.lisp: The http-body/src/util․lisp file

H
http-body: The http-body system
http-body: The http-body package
http-body-asd: The http-body-asd package
http-body.asd: The http-body/http-body․asd file
http-body.json: The http-body․json package
http-body.lisp: The http-body/src/http-body․lisp file
http-body.multipart: The http-body․multipart package
http-body.urlencoded: The http-body․urlencoded package
http-body.util: The http-body․util package

J
json.lisp: The http-body/src/json․lisp file

M
Module, src: The http-body/src module
multipart.lisp: The http-body/src/multipart․lisp file

P
Package, http-body: The http-body package
Package, http-body-asd: The http-body-asd package
Package, http-body.json: The http-body․json package
Package, http-body.multipart: The http-body․multipart package
Package, http-body.urlencoded: The http-body․urlencoded package
Package, http-body.util: The http-body․util package

S
src: The http-body/src module
System, http-body: The http-body system

U
urlencoded.lisp: The http-body/src/urlencoded․lisp file
util.lisp: The http-body/src/util․lisp file