forked from fishpond-haiku/Haiku-Radio
-
Notifications
You must be signed in to change notification settings - Fork 0
/
HttpUtils.h
38 lines (30 loc) · 1.12 KB
/
HttpUtils.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/*
* File: HttpUtils.h
* Author: user
*
* Created on 12. Oktober 2015, 23:14
*/
#ifndef HTTPUTILS_H
#define HTTPUTILS_H
#include <DataIO.h>
#include <HttpRequest.h>
#include <Url.h>
#include <StringList.h>
class HttpRequest : public BHttpRequest {
public:
HttpRequest(const BUrl& url,
bool ssl = false,
const char* protocolName = "HTTP",
BUrlProtocolListener* listener = NULL,
BUrlContext* context = NULL)
: BHttpRequest(url, ssl, protocolName, listener, context) { };
virtual BHttpResult& Result() const {
return (BHttpResult&)BHttpRequest::Result();
};
};
class HttpUtils {
public:
static BMallocIO* GetAll(BUrl url, BHttpHeaders* returnHeaders = NULL, bigtime_t timeOut=3000, BString* contentType = NULL, size_t sizeLimit = 0);
static status_t GetStreamHeader(BUrl url, BHttpHeaders* headers);
};
#endif /* HTTPUTILS_H */