Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove MicroLogging #142

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@
.DS_Store
*.key
*.crt
*.swp
docs/build/
docs/site/
docs/site/
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
language: julia
os:
- linux
- osx
# - osx
julia:
- 0.6
- nightly
Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

# HTTP

*Performant, robust HTTP client and server functionality for Julia*
*HTTP client and server functionality for Julia*

| **Documentation** | **PackageEvaluator** | **Build Status** |
|:-------------------------------------------------------------------------------:|:---------------------------------------------------------------:|:-----------------------------------------------------------------------------------------------:|
Expand All @@ -22,6 +22,9 @@ julia> Pkg.add("HTTP")

## Project Status

The package is new and not yet tested in production systems.
Please try it out and report your experiance.

The package is tested against Julia 0.6 & current master on Linux, OS X, and Windows.

## Contributing and Questions
Expand Down
3 changes: 2 additions & 1 deletion REQUIRE
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
julia 0.6
MbedTLS 0.4.0
MbedTLS 0.5.2
IniFile
212 changes: 188 additions & 24 deletions docs/src/index.md
Original file line number Diff line number Diff line change
@@ -1,55 +1,219 @@
# HTTP.jl Documentation

`HTTP.jl` provides a pure Julia library for HTTP functionality.
`HTTP.jl` is a Julia library for HTTP Messages.

[`HTTP.request`](@ref) sends a HTTP Request Message and
returns a Response Message.

```julia
r = HTTP.request("GET", "http://httpbin.org/ip")
println(r.status)
println(String(r.body))
```

[`HTTP.open`](@ref) sends a HTTP Request Message and
opens an `IO` stream from which the Response can be read.

```julia
HTTP.open("GET", "https://tinyurl.com/bach-cello-suite-1-ogg") do http
open(`vlc -q --play-and-exit --intf dummy -`, "w") do vlc
write(vlc, http)
end
end
```


```@contents
```

## Requests
Note that the HTTP methods of POST, DELETE, PUT, etc. all follow the same format as `HTTP.get`, documented below.


```@docs
HTTP.request(::String,::HTTP.URIs.URI,::Array{Pair{String,String},1},::Any)
HTTP.open
HTTP.get
HTTP.Client
HTTP.Connection
HTTP.put
HTTP.post
HTTP.head
```

### HTTP request errors
Request functions may throw the following exceptions:

```@docs
HTTP.ConnectError
HTTP.SendError
HTTP.ClosedError
HTTP.ReadError
HTTP.RedirectError
HTTP.StatusError
HTTP.ParsingError
HTTP.IOError
```
```
Base.DNSError
```


## Server / Handlers

```@docs
HTTP.serve
HTTP.Server
HTTP.listen
HTTP.Servers.serve
HTTP.Servers.Server
HTTP.Handler
HTTP.HandlerFunction
HTTP.Router
HTTP.register!
```

## HTTP Types

## URIs

```@docs
HTTP.URI
HTTP.Request
HTTP.RequestOptions
HTTP.Response
HTTP.URIs.escapeuri
HTTP.URIs.unescapeuri
HTTP.URIs.splitpath
Base.isvalid(::HTTP.URIs.URI)
```


## Cookies

```@docs
HTTP.Cookie
HTTP.FIFOBuffer
```

## HTTP Utilities

## Utilities

```@docs
HTTP.parse
HTTP.escape
HTTP.unescape
HTTP.splitpath
HTTP.isvalid
HTTP.sniff
HTTP.escapeHTML
HTTP.Strings.escapehtml
```

# HTTP.jl Internal Architecture

```@docs
HTTP.Layer
HTTP.stack
```


## Request Execution Layers

```@docs
HTTP.RedirectLayer
HTTP.BasicAuthLayer
HTTP.CookieLayer
HTTP.CanonicalizeLayer
HTTP.MessageLayer
HTTP.AWS4AuthLayer
HTTP.RetryLayer
HTTP.ExceptionLayer
HTTP.ConnectionPoolLayer
HTTP.TimeoutLayer
HTTP.StreamLayer
```

## Parser

*Source: `Parsers.jl`*

```@docs
HTTP.Parsers.Parser
```


## Messages
*Source: `Messages.jl`*

```@docs
HTTP.Messages
```


## Streams
*Source: `Streams.jl`*

```@docs
HTTP.Streams.Stream
```


## Connections

*Source: `ConnectionPool.jl`*

```@docs
HTTP.ConnectionPool
```


# Internal Interfaces

## Parser Interface

```@docs
HTTP.Parsers.Message
HTTP.Parsers.parseheaders
HTTP.Parsers.parsebody
HTTP.Parsers.reset!
HTTP.Parsers.messagestarted
HTTP.Parsers.headerscomplete
HTTP.Parsers.bodycomplete
HTTP.Parsers.messagecomplete
HTTP.Parsers.messagehastrailing
```

## Messages Interface

```@docs
HTTP.Messages.Request
HTTP.Messages.Response
HTTP.Messages.iserror
HTTP.Messages.isredirect
HTTP.Messages.ischunked
HTTP.Messages.issafe
HTTP.Messages.isidempotent
HTTP.Messages.header
HTTP.Messages.hasheader
HTTP.Messages.setheader
HTTP.Messages.defaultheader
HTTP.Messages.appendheader
HTTP.Messages.readheaders
HTTP.Messages.readstartline!
HTTP.Messages.headerscomplete(::HTTP.Messages.Response)
HTTP.Messages.readtrailers
HTTP.Messages.writestartline
HTTP.Messages.writeheaders
Base.write(::IO,::HTTP.Messages.Message)
```

## IOExtras Interface

```@docs
HTTP.IOExtras
HTTP.IOExtras.unread!
HTTP.IOExtras.startwrite(::IO)
HTTP.IOExtras.isioerror
```


## Streams Interface

```@docs
HTTP.Streams.closebody
HTTP.Streams.isaborted
```


## Connection Pooling Interface

```@docs
HTTP.ConnectionPool.Connection
HTTP.ConnectionPool.Transaction
HTTP.ConnectionPool.pool
HTTP.ConnectionPool.getconnection
HTTP.IOExtras.unread!(::HTTP.ConnectionPool.Transaction,::SubArray{UInt8,1,Array{UInt8,1},Tuple{UnitRange{Int64}},true})
HTTP.IOExtras.startwrite(::HTTP.ConnectionPool.Transaction)
HTTP.IOExtras.closewrite(::HTTP.ConnectionPool.Transaction)
HTTP.IOExtras.startread(::HTTP.ConnectionPool.Transaction)
HTTP.IOExtras.closeread(::HTTP.ConnectionPool.Transaction)
```
Binary file added docs/src/layers.monopic
Binary file not shown.
Loading