Skip to content

Commit

Permalink
ofURLFileLoader: ofHttpResponse, added cast operator to ofBuffer + de…
Browse files Browse the repository at this point in the history
…fault constructor
  • Loading branch information
arturoc committed Jul 21, 2011
1 parent 6d3a5f2 commit 1f69805
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions libs/openFrameworks/utils/ofURLFileLoader.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@

class ofHttpRequest{
public:
ofHttpRequest(){};

ofHttpRequest(string url,string name,bool saveTo=false)
:url(url)
,name(name)
Expand All @@ -30,6 +32,8 @@ class ofHttpRequest{

class ofHttpResponse{
public:
ofHttpResponse(){}

ofHttpResponse(ofHttpRequest request,const ofBuffer & data,int status, string error)
:request(request)
,data(data)
Expand All @@ -41,6 +45,10 @@ class ofHttpResponse{
,status(status)
,error(error){}

operator ofBuffer&(){
return data;
}

ofHttpRequest request;
ofBuffer data;
int status;
Expand Down

0 comments on commit 1f69805

Please sign in to comment.