#include <llhttpclient.h>
Public Types | |
typedef LLCurl::Responder | Responder |
typedef LLCurl::ResponderPtr | ResponderPtr |
Static Public Member Functions | |
static LLSD | blockingGet (const std::string &url) |
Blocking HTTP get that returns an LLSD map of status and body. | |
static void | setPump (LLPumpIO &pump) |
must be called before any of the above calls are made | |
static bool | hasPump () |
for testing | |
non-blocking API | |
static void | head (const std::string &url, ResponderPtr, const F32 timeout=HTTP_REQUEST_EXPIRY_SECS) |
static void | getByteRange (const std::string &url, S32 offset, S32 bytes, ResponderPtr, const LLSD &headers=LLSD(), const F32 timeout=HTTP_REQUEST_EXPIRY_SECS) |
static void | get (const std::string &url, ResponderPtr, const LLSD &headers=LLSD(), const F32 timeout=HTTP_REQUEST_EXPIRY_SECS) |
static void | get (const std::string &url, const LLSD &query, ResponderPtr, const LLSD &headers=LLSD(), const F32 timeout=HTTP_REQUEST_EXPIRY_SECS) |
static void | put (const std::string &url, const LLSD &body, ResponderPtr, const F32 timeout=HTTP_REQUEST_EXPIRY_SECS) |
static void | getHeaderOnly (const std::string &url, ResponderPtr, const F32 timeout=HTTP_REQUEST_EXPIRY_SECS) |
static void | getHeaderOnly (const std::string &url, ResponderPtr, const LLSD &headers, const F32 timeout=HTTP_REQUEST_EXPIRY_SECS) |
static void | post (const std::string &url, const LLSD &body, ResponderPtr, const F32 timeout=HTTP_REQUEST_EXPIRY_SECS) |
static void | post (const std::string &url, const U8 *data, S32 size, ResponderPtr responder, const F32 timeout=HTTP_REQUEST_EXPIRY_SECS) |
static void | postFile (const std::string &url, const std::string &filename, ResponderPtr, const F32 timeout=HTTP_REQUEST_EXPIRY_SECS) |
static void | postFile (const std::string &url, const LLUUID &uuid, LLAssetType::EType asset_type, ResponderPtr responder, const F32 timeout=HTTP_REQUEST_EXPIRY_SECS) |
static void | del (const std::string &url, ResponderPtr responder, const F32 timeout=HTTP_REQUEST_EXPIRY_SECS) |
sends a DELETE method, but we can't call it delete in c++ | |
static void | move (const std::string &url, const std::string &destination, ResponderPtr responder, const F32 timeout=HTTP_REQUEST_EXPIRY_SECS) |
Send a MOVE webdav method. |
Definition at line 54 of file llhttpclient.h.
Definition at line 60 of file llhttpclient.h.
Definition at line 61 of file llhttpclient.h.
void LLHTTPClient::head | ( | const std::string & | url, | |
ResponderPtr | responder, | |||
const F32 | timeout = HTTP_REQUEST_EXPIRY_SECS | |||
) | [static] |
Definition at line 291 of file llhttpclient.cpp.
References LLURLRequest::HTTP_HEAD, NULL, and request().
Referenced by LLPanelLogin::LLPanelLogin().
void LLHTTPClient::getByteRange | ( | const std::string & | url, | |
S32 | offset, | |||
S32 | bytes, | |||
ResponderPtr | responder, | |||
const LLSD & | headers = LLSD() , |
|||
const F32 | timeout = HTTP_REQUEST_EXPIRY_SECS | |||
) | [static] |
Definition at line 273 of file llhttpclient.cpp.
References LLURLRequest::HTTP_GET, NULL, and request().
void LLHTTPClient::get | ( | const std::string & | url, | |
ResponderPtr | responder, | |||
const LLSD & | headers = LLSD() , |
|||
const F32 | timeout = HTTP_REQUEST_EXPIRY_SECS | |||
) | [static] |
Definition at line 296 of file llhttpclient.cpp.
References LLURLRequest::HTTP_GET, NULL, and request().
Referenced by LLFloaterTOS::postBuild().
void LLHTTPClient::get | ( | const std::string & | url, | |
const LLSD & | query, | |||
ResponderPtr | responder, | |||
const LLSD & | headers = LLSD() , |
|||
const F32 | timeout = HTTP_REQUEST_EXPIRY_SECS | |||
) | [static] |
Definition at line 309 of file llhttpclient.cpp.
References LLURI::asString(), LLURI::buildHTTP(), and LLSD::emptyArray().
void LLHTTPClient::put | ( | const std::string & | url, | |
const LLSD & | body, | |||
ResponderPtr | responder, | |||
const F32 | timeout = HTTP_REQUEST_EXPIRY_SECS | |||
) | [static] |
Definition at line 404 of file llhttpclient.cpp.
References LLURLRequest::HTTP_PUT, and request().
void LLHTTPClient::getHeaderOnly | ( | const std::string & | url, | |
ResponderPtr | responder, | |||
const F32 | timeout = HTTP_REQUEST_EXPIRY_SECS | |||
) | [static] |
Definition at line 304 of file llhttpclient.cpp.
Referenced by LLFloaterURLEntry::onBtnOK(), and LLViewerParcelMedia::update().
void LLHTTPClient::getHeaderOnly | ( | const std::string & | url, | |
ResponderPtr | responder, | |||
const LLSD & | headers, | |||
const F32 | timeout = HTTP_REQUEST_EXPIRY_SECS | |||
) | [static] |
Definition at line 300 of file llhttpclient.cpp.
References LLURLRequest::HTTP_HEAD, NULL, and request().
void LLHTTPClient::post | ( | const std::string & | url, | |
const LLSD & | body, | |||
ResponderPtr | responder, | |||
const F32 | timeout = HTTP_REQUEST_EXPIRY_SECS | |||
) | [static] |
Definition at line 409 of file llhttpclient.cpp.
References LLURLRequest::HTTP_POST, and request().
Referenced by LLInventoryModel::bulkFetch(), LLPanelEstateInfo::commitEstateInfoCaps(), copy_inventory_from_notecard(), LLPanelPlace::displayParcelInfo(), LLTextureFetchWorker::doWork(), LLVoiceChannelGroup::getChannelInfo(), LLFloaterIMPanel::inviteToSession(), LLIMMgr::inviteUserResponse(), LLPanelActiveSpeakers::onChangeModerationMode(), LLInventoryModel::fetchDescendentsResponder::onClickRetry(), LLPanelActiveSpeakers::onModeratorMuteText(), LLPanelActiveSpeakers::onModeratorMuteVoice(), LLVoiceClient::parcelChanged(), LLViewerChatterBoxInvitation::post(), LLVoiceClient::requestVoiceAccountProvision(), LLCrashLogger::runCrashLogPost(), LLPreviewNotecard::saveIfNeeded(), LLPreviewGesture::saveIfNeeded(), LLCapHTTPSender::send(), LLHTTPSender::send(), send_start_session_messages(), send_stats(), LLPanelClassified::sendClassifiedClickMessage(), LLPanelClassified::sendClassifiedInfoRequest(), LLPanelGroupVoting::impl::sendGroupProposalBallot(), LLWorldMap::sendMapLayerRequest(), LLViewerParcelMgr::sendParcelPropertiesUpdate(), LLFloaterPostcard::sendPostcard(), LLFloaterReporter::sendReportViaCaps(), LLPanelGroupVoting::impl::sendStartGroupProposal(), LLPanelRegionGeneralInfo::sendUpdate(), LLViewerRegion::setSeedCapability(), upload_new_resource(), LLLiveLSLEditor::uploadAssetViaCaps(), and LLPreviewLSL::uploadAssetViaCaps().
void LLHTTPClient::post | ( | const std::string & | url, | |
const U8 * | data, | |||
S32 | size, | |||
ResponderPtr | responder, | |||
const F32 | timeout = HTTP_REQUEST_EXPIRY_SECS | |||
) | [static] |
Definition at line 414 of file llhttpclient.cpp.
References LLURLRequest::HTTP_POST, and request().
void LLHTTPClient::postFile | ( | const std::string & | url, | |
const std::string & | filename, | |||
ResponderPtr | responder, | |||
const F32 | timeout = HTTP_REQUEST_EXPIRY_SECS | |||
) | [static] |
Definition at line 419 of file llhttpclient.cpp.
References LLURLRequest::HTTP_POST, and request().
Referenced by LLAssetUploadResponder::uploadUpload().
void LLHTTPClient::postFile | ( | const std::string & | url, | |
const LLUUID & | uuid, | |||
LLAssetType::EType | asset_type, | |||
ResponderPtr | responder, | |||
const F32 | timeout = HTTP_REQUEST_EXPIRY_SECS | |||
) | [static] |
Definition at line 424 of file llhttpclient.cpp.
References LLURLRequest::HTTP_POST, and request().
void LLHTTPClient::del | ( | const std::string & | url, | |
ResponderPtr | responder, | |||
const F32 | timeout = HTTP_REQUEST_EXPIRY_SECS | |||
) | [static] |
sends a DELETE method, but we can't call it delete in c++
Definition at line 431 of file llhttpclient.cpp.
References LLURLRequest::HTTP_DELETE, NULL, and request().
void LLHTTPClient::move | ( | const std::string & | url, | |
const std::string & | destination, | |||
ResponderPtr | responder, | |||
const F32 | timeout = HTTP_REQUEST_EXPIRY_SECS | |||
) | [static] |
Send a MOVE webdav method.
url | The complete serialized (and escaped) url to get. | |
destination | The complete serialized destination url. | |
responder | The responder that will handle the result. | |
timeout | The number of seconds to give the server to respond. |
Definition at line 440 of file llhttpclient.cpp.
References LLURLRequest::HTTP_MOVE, NULL, and request().
LLSD LLHTTPClient::blockingGet | ( | const std::string & | url | ) | [static] |
Blocking HTTP get that returns an LLSD map of status and body.
url | the complete serialized (and escaped) url to get |
Definition at line 354 of file llhttpclient.cpp.
References LLHTTPBuffer::asLLSD(), LLHTTPBuffer::asString(), LLHTTPBuffer::curl_write(), LLSD::emptyMap(), llendl, llinfos, llwarns, and S32.
void LLHTTPClient::setPump | ( | LLPumpIO & | pump | ) | [static] |
must be called before any of the above calls are made
Definition at line 452 of file llhttpclient.cpp.
References theClientPump.
Referenced by tut::HTTPClientTestData::HTTPClientTestData(), LLCrashLogger::init(), and LLAppViewer::mainLoop().
bool LLHTTPClient::hasPump | ( | ) | [static] |
for testing
Definition at line 457 of file llhttpclient.cpp.
References NULL, and theClientPump.
Referenced by request().