-
Notifications
You must be signed in to change notification settings - Fork 14
ResponseWriter
Josh Wright edited this page Jan 14, 2021
·
3 revisions
An abstraction around writing data to a remote peer. Conform to
this protocol and inject it into the Response
for responding
to a remote peer at a later point in time.
public protocol ResponseWriter
Be sure to call writeEnd
when you are finished writing data or
the client response will never complete.
Write the status and head of a response. Should only be called once.
func writeHead(status: HTTPResponseStatus, _ headers: HTTPHeaders)
- status: The status code of the response.
- headers: Any headers of this response.
Write some body data to the remote peer. May be called 0 or more times.
func writeBody(_ body: ByteBuffer)
- body: The buffer of data to write.
Write the end of the response. Needs to be called once per response, when all data has been written.
func writeEnd()
Generated at 2021-01-13T22:24:59-0800 using swift-doc 1.0.0-beta.5.
Alchemy
Types
- AlterTableBuilder
- BCryptDigest
- BasicAuthMiddleware
- BcryptError
- BelongsToRelationship
- CORSMiddleware
- CORSMiddleware.AllowOriginSetting
- CORSMiddleware.Configuration
- ColumnType
- CreateColumn
- CreateColumnBuilder
- CreateIndex
- CreateTableBuilder
- DatabaseConfig
- DatabaseError
- DatabaseField
- DatabaseKeyMappingStrategy
- DatabaseValue
- DayUnit
- Env
- FrequencyTyped
- Grammar
- HTTPAuth
- HTTPAuth.Basic
- HTTPAuth.Bearer
- HTTPBody
- HTTPError
- HasManyRelationship
- HasOneRelationship
- HasRelationship
- HourUnit
- JoinClause
- JoinType
- Launch
- Log
- MIMEType
- MinuteUnit
- ModelQuery
- MySQLDatabase
- Operator
- OrderClause
- OrderClause.Sort
- OrderedDictionary
- PapyrusClientError
- PathParameter
- PathParameter.DecodingError
- PostgresDatabase
- Query
- Request
- Response
- Router
- RuneError
- SQL
- SQLJSON
- Scheduler
- Schema
- SecondUnit
- Services
- Socket
- StaticFileMiddleware
- StringLength
- Thread
- TokenAuthMiddleware
- WeekUnit
- Weekday
- WhereBoolean
- WhereColumn
- WhereIn
- WhereIn.InType
- WhereNested
- WhereRaw
- WhereValue