Plugins:GenericHttpMethod: Difference between revisions

Jump to navigation Jump to search
(rename the methods)
Line 40: Line 40:
</pre>
</pre>


and have a matching plugin method providing all aspects of the HTTP response:
and have a matching plugin method that would be called as soon as status line and response headers are received (see [http://www.w3.org/TR/XMLHttpRequest/#headers-received-state headers-received state in XmlHttpRequest]):


<pre>
<pre>
Line 46: Line 46:
   NPP instance,
   NPP instance,
   const char* url,
   const char* url,
  NPReason reason,
   int status,
   int status,
   const char* headers,
   const char* headers, // potentially including the status line
   void* notifyData);
   void* notifyData);
</pre>
</pre>
Another callback would then be needed to signal the final result.


=== Open Issues ===
=== Open Issues ===


* ''(Darin pointed out that this method is only called upon completion; it would be nice to have access to the response status and headers as soon as they are received though)''
* Extend the NPN_RequestURLNotify with a flags parameter controlling how redirects are handled (and leaving room for future extensions?)
* Extend the NPN_RequestURLNotify with a flags parameter controlling how redirects are handled (and leaving room for future extensions?)
* Do we need a separate callback for the final state (as in NPN_PostURLNotify. or should we just keep calling NPP_HttpResponseNotify and add a status field as in XmlHttpRequest?)
88

edits

Navigation menu