Esempio n. 1
0
INetResponse* CURLNetRequest::doRequest(const char *method, const String& strUrl,
                                        const String& strBody, IRhoSession *oSession,
                                        Hashtable<String,String>* pHeaders)
{
    INetResponse* pResp = doPull(method, strUrl, strBody, null, oSession, pHeaders);
    return pResp;
}
Esempio n. 2
0
void ReadableStream::pull()
{
    if (!m_isStarted || m_state == State::Closed || m_state == State::Errored || m_closeRequested)
        return;

    if (m_readRequests.isEmpty() && hasEnoughValues())
        return;

    if (m_isPulling) {
        m_shouldPullAgain = true;
        return;
    }

    m_isPulling = true;
    if (doPull()) {
        RefPtr<ReadableStream> protectedStream(this);
        scriptExecutionContext()->postTask([protectedStream](ScriptExecutionContext&) {
            protectedStream->finishPulling();
        });
    }
}
Esempio n. 3
0
INetResponse* CURLNetRequest::pullFile(const String& strUrl, common::CRhoFile& oFile, IRhoSession* oSession, Hashtable<String,String>* pHeaders)
{
    return doPull("GET", strUrl, String(), &oFile, oSession, pHeaders);
}