Adding URLResponse to emit response events, implementing status code.
This commit is contained in:
parent
7521aeea09
commit
81eab9887b
6 changed files with 185 additions and 32 deletions
|
@ -22,17 +22,31 @@ class URLRequest : public mate::EventEmitter<URLRequest> {
|
|||
static void BuildPrototype(v8::Isolate* isolate,
|
||||
v8::Local<v8::FunctionTemplate> prototype);
|
||||
|
||||
void start();
|
||||
void stop();
|
||||
void OnResponseStarted();
|
||||
protected:
|
||||
URLRequest(v8::Isolate* isolate,
|
||||
v8::Local<v8::Object> wrapper);
|
||||
~URLRequest() override;
|
||||
|
||||
|
||||
private:
|
||||
void Write();
|
||||
void End();
|
||||
void Abort();
|
||||
void SetHeader();
|
||||
void GetHeader();
|
||||
void RemoveHeader();
|
||||
|
||||
friend class AtomURLRequest;
|
||||
void OnResponseStarted();
|
||||
void OnResponseData();
|
||||
void OnResponseEnd();
|
||||
|
||||
int StatusCode();
|
||||
void StatusMessage();
|
||||
void ResponseHeaders();
|
||||
void ResponseHttpVersion();
|
||||
|
||||
|
||||
private:
|
||||
void pin();
|
||||
void unpin();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue