2 * Copyright 2010-2017 Haiku Inc. All rights reserved.
3 * Distributed under the terms of the MIT License.
5 #ifndef _B_HTTP_RESULT_H_
6 #define _B_HTTP_RESULT_H_
11 #include <HttpHeaders.h>
14 #include <UrlResult.h>
20 class BHttpResult
: public BUrlResult
{
21 friend class BHttpRequest
;
24 BHttpResult(const BUrl
& url
);
25 BHttpResult(BMessage
*);
26 BHttpResult(const BHttpResult
& other
);
29 // Result parameters modifications
30 void SetUrl(const BUrl
& url
);
32 // Result parameters access
33 const BUrl
& Url() const;
34 BString
ContentType() const;
35 size_t Length() const;
37 // HTTP-Specific stuff
38 const BHttpHeaders
& Headers() const;
39 const BString
& StatusText() const;
40 int32
StatusCode() const;
43 bool HasHeaders() const;
46 BHttpResult
& operator=(const BHttpResult
& other
);
48 virtual status_t
Archive(BMessage
*, bool) const;
49 static BArchivable
* Instantiate(BMessage
*);
53 BHttpHeaders fHeaders
;
55 BString fStatusString
;
59 #endif // _B_URL_RESULT_H_