Plugins:GenericHttpMethod: Difference between revisions

Jump to navigation Jump to search
Line 45: Line 45:
</pre>
</pre>


and have a matching plugin method that would be called everytime the state of the request state changes (see [http://www.w3.org/TR/XMLHttpRequest/#states XHR states]).
and have a matching plugin method that would be called everytime the request state changes (see [http://www.w3.org/TR/XMLHttpRequest/#states XHR readyState]).


<pre>
<pre>
Line 51: Line 51:
   NPP instance,
   NPP instance,
   const char* url,
   const char* url,
   int requestState, // [http://www.w3.org/TR/XMLHttpRequest/#states XHR state]
   int readyState, // http://www.w3.org/TR/XMLHttpRequest/#states
   int httpResponseStatus,
   int httpResponseStatus,
   const char* headers, // potentially including the status line
   const char* headers, // potentially including the status line
Line 57: Line 57:
</pre>
</pre>


A callback with requestState == [http://www.w3.org/TR/XMLHttpRequest/#done-state DONE] would then signal the completion of the request.
A callback with readyState == [http://www.w3.org/TR/XMLHttpRequest/#done-state DONE] would then signal the completion of the request.


To address potential security issues with certain HTTP methods (for instance, TRACE), and to allow easier deployment, support for methods other than GET and POST would only be RECOMMENDED, and a new status code (see below) allows the caller to detect this condition.
To address potential security issues with certain HTTP methods (for instance, TRACE), and to allow easier deployment, support for methods other than GET and POST would only be RECOMMENDED, and a new status code (see below) allows the caller to detect this condition.
88

edits

Navigation menu