AUI Framework  develop
Cross-platform base for C++ UI apps
Loading...
Searching...
No Matches
ACurl::Builder Class Reference

Member Function Documentation

> All members, including inherited

◆ runAsync() [1/2]

AFuture< Response > ACurl::Builder::runAsync ( )
Returns
Response future.

◆ runAsync() [2/2]

AFuture< Response > ACurl::Builder::runAsync ( ACurlMulti & curlMulti)
Returns
Response future.

◆ runBlocking()

Response ACurl::Builder::runBlocking ( )
Exceptions
AIOException

◆ toInputStream()

_unique< IInputStream > ACurl::Builder::toInputStream ( )
Note
creates async task where curl's loop lives in.
Exceptions
AIOException
Returns
input stream

◆ withBody()

Builder & ACurl::Builder::withBody ( ReadCallback callback)
inline
Parameters
callbackcallback to call.
Returns
this

◆ withErrorCallback()

Builder & ACurl::Builder::withErrorCallback ( ErrorCallback callback)
inline
Note
Also disables throwing exception on error

◆ withHeaderCallback()

Builder & ACurl::Builder::withHeaderCallback ( HeaderCallback headerCallback)
inline
Parameters
headerCallbackcallback to call.
Returns
this

◆ withInputStream()

Builder & ACurl::Builder::withInputStream ( _< IInputStream > inputStream)
inline
Parameters
inputStreaminput stream to get data to upload from.
Returns
this

◆ withLowSpeedLimit()

Builder & ACurl::Builder::withLowSpeedLimit ( size_t speed)
Parameters
speedthreshold speed (bytes per second).

◆ withLowSpeedTime()

Builder & ACurl::Builder::withLowSpeedTime ( std::chrono::seconds duration)
Parameters
durationduration

◆ withMethod()

Builder & ACurl::Builder::withMethod ( Method method)
inlinenoexcept

GET is by default.

◆ withMultipart()

Builder & ACurl::Builder::withMultipart ( const AFormMultipart & multipart)
inline

This function implies adding Content-Type: multipart and it's boundaries, setting withBody with multipart data.

◆ withParams() [1/2]

Builder & ACurl::Builder::withParams ( AString params)
inlinenoexcept

In GET, the params are encoded and appended to the url.

In POST, this value is used instead of readCallback (withBody).

◆ withParams() [2/2]

Builder & ACurl::Builder::withParams ( const AVector< std::pair< AString, AString > > & params)
Parameters
paramsparams map in key,value pairs.

In GET, the params are encoded and appended to the url.

In POST, this value is used instead of readCallback (withBody).

◆ withRanges() [1/2]

Builder & ACurl::Builder::withRanges ( size_t begin)
inline
Parameters
beginstart index of the part
Returns
this

◆ withRanges() [2/2]

Builder & ACurl::Builder::withRanges ( size_t begin,
size_t end )
Parameters
beginstart index of the part
endend index of the part.
Returns
this

◆ withTimeout()

Builder & ACurl::Builder::withTimeout ( std::chrono::seconds timeout)
Returns
this

◆ withWriteCallback() [1/2]

Builder & ACurl::Builder::withWriteCallback ( WriteCallback callback)
inline
Parameters
callbackcallback to call.
Returns
this
See also
withDestinationBuffer

◆ withWriteCallback() [2/2]

Builder & ACurl::Builder::withWriteCallback ( WriteCallbackV2 callback)
inline
Parameters
callbackcallback to call.
Returns
this
See also
withDestinationBuffer