diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2015-04-07 13:43:24 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2015-04-07 13:43:24 +0000 |
commit | 96f529b347c2c3c0394a0bc3ad1c6830137847a9 (patch) | |
tree | 1b97a670523f3b0e74c4628e71e968061df85979 /protocols/SkypeWeb/src/requests | |
parent | 4056ab703967ccbba528aebc93802f732ae13884 (diff) |
set avatar 2nd attempt
git-svn-id: http://svn.miranda-ng.org/main/trunk@12652 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/SkypeWeb/src/requests')
-rw-r--r-- | protocols/SkypeWeb/src/requests/avatars.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/protocols/SkypeWeb/src/requests/avatars.h b/protocols/SkypeWeb/src/requests/avatars.h index c45c94c1ed..6b71a0732d 100644 --- a/protocols/SkypeWeb/src/requests/avatars.h +++ b/protocols/SkypeWeb/src/requests/avatars.h @@ -13,14 +13,19 @@ public: class SetAvatarRequest : public HttpRequest
{
public:
- SetAvatarRequest(const char *token, const char *skypename, const char *data) :
+ SetAvatarRequest(const char *token, const char *skypename, const char *data, size_t dataSize) :
HttpRequest(REQUEST_PUT, FORMAT, "api.skype.com/users/%s/profile/avatar", skypename)
{
+ pData = (char*)mir_alloc(dataSize);
+ memcpy(pData, data, dataSize);
+ dataLength = dataSize;
Headers
<< CHAR_VALUE("X-Skypetoken", token)
- << CHAR_VALUE("Content-Type", "image/jpg");
-
- Body << VALUE(data);
+ << CHAR_VALUE("Content-Type", "image/jpeg");
+ }
+ ~SetAvatarRequest()
+ {
+ mir_free(pData);
}
};
|