Skip to content

Commit

Permalink
Fix missing docstrings in docs. (#677)
Browse files Browse the repository at this point in the history
  • Loading branch information
fredrikekre authored Feb 22, 2021
1 parent 9953bfa commit ed99a10
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 11 deletions.
4 changes: 3 additions & 1 deletion docs/Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
[deps]
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
HTTP = "cd3eb016-35fb-5094-929b-558a96fad6f3"
Sockets = "6462fe0b-24de-5631-8697-dd941f90decc"
URIs = "5c2747f8-b7ea-4ff2-ba2e-563bfd36b1d4"

[compat]
Documenter = "0.25"
Documenter = "0.26"
4 changes: 2 additions & 2 deletions docs/make.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Documenter, HTTP
using Documenter, HTTP, Sockets, URIs

"""
Loops through the files in the examples folder and adds them (with any header comments) to the examples.md
Expand Down Expand Up @@ -72,7 +72,7 @@ end
generateExamples()

makedocs(
modules = [HTTP],
# modules = [HTTP],
sitename = "HTTP.jl",
pages = [
"Home" => "index.md",
Expand Down
2 changes: 1 addition & 1 deletion docs/src/internal_interface.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ HTTP.Streams.isaborted
```@docs
HTTP.ConnectionPool.Connection
HTTP.ConnectionPool.Transaction
HTTP.ConnectionPool.pool
HTTP.ConnectionPool.getconnection
HTTP.ConnectionPool.POOL
HTTP.IOExtras.startwrite(::HTTP.ConnectionPool.Transaction)
HTTP.IOExtras.closewrite(::HTTP.ConnectionPool.Transaction)
HTTP.IOExtras.startread(::HTTP.ConnectionPool.Transaction)
Expand Down
20 changes: 13 additions & 7 deletions docs/src/public_interface.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,31 +11,37 @@ HTTP.post
HTTP.head
```

Request body types
### Request body types

```@docs
HTTP.Form
HTTP.Multipart
```

### Request exceptions

Request functions may throw the following exceptions:

```@docs
HTTP.StatusError
HTTP.ParseError
HTTP.IOError
```
```
```@docs
Sockets.DNSError
```

## URIs

HTTP.jl uses the [URIs.jl](https://github.com/JuliaWeb/URIs.jl) package for handling
URIs. Some functionality from URIs.jl, relevant to HTTP.jl, are listed below:

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


Expand Down
5 changes: 5 additions & 0 deletions src/ConnectionPool.jl
Original file line number Diff line number Diff line change
Expand Up @@ -523,6 +523,11 @@ struct Pool
conns::Dict{UInt, Pod}
end

"""
POOL
Global connection pool keeping track of active connections.
"""
const POOL = Pool(ReentrantLock(), Dict{UInt, Pod}())

function getpod(pool::Pool, x)
Expand Down

0 comments on commit ed99a10

Please sign in to comment.