Reintroduce BUrlResult and add BDataRequest
* BUrlResult is back, with ContentType and Length methods. * BHttpResult subclasses it and use HTTP header fields to implement those * Introduce BDataRequest for "data" URIs. These embed the data inside the URI, either as plaintext or base64 encoded.
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* Copyright 2013 Haiku, Inc. All rights reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* Authors:
|
||||
* Adrien Destugues, [email protected]
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _B_DATA_REQUEST_H_
|
||||
#define _B_DATA_REQUEST_H_
|
||||
|
||||
|
||||
#include <UrlRequest.h>
|
||||
|
||||
|
||||
class BDataRequest: public BUrlRequest {
|
||||
public:
|
||||
BDataRequest(const BUrl& url,
|
||||
BUrlProtocolListener* listener = NULL,
|
||||
BUrlContext* context = NULL);
|
||||
const BUrlResult& Result() const;
|
||||
private:
|
||||
status_t _ProtocolLoop();
|
||||
private:
|
||||
BUrlResult fResult;
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user