Merge pull request #3701 from deepak1556/protocol_post_data_patch
protocol: provide upload data when available
This commit is contained in:
commit
a05aa81570
4 changed files with 114 additions and 1 deletions
|
@ -107,11 +107,16 @@ Registers a protocol of `scheme` that will send a `String` as a response. The
|
|||
|
||||
Registers a protocol of `scheme` that will send an HTTP request as a response.
|
||||
The `callback` should be called with an object that has the `url`, `method`,
|
||||
`referrer`, and `session` properties.
|
||||
`referrer`, `uploadData` and `session` properties.
|
||||
|
||||
By default the HTTP request will reuse the current session. If you want the
|
||||
request to have a different session you should set `session` to `null`.
|
||||
|
||||
POST request should provide an `uploadData` object.
|
||||
* `uploadData` object
|
||||
* `contentType` String - MIME type of the content.
|
||||
* `data` String - Content to be sent.
|
||||
|
||||
### `protocol.unregisterProtocol(scheme[, completion])`
|
||||
|
||||
* `scheme` String
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue