http-post-message
Advanced tools
Comparing version 0.1.1 to 0.1.2
@@ -1,2 +0,2 @@ | ||
/*! http-post-message v0.1.1 | (c) 2016 Microsoft Corporation MIT */ | ||
/*! http-post-message v0.1.2 | (c) 2016 Microsoft Corporation MIT */ | ||
interface IHttpPostMessageRequest { | ||
@@ -3,0 +3,0 @@ method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE"; |
@@ -1,2 +0,2 @@ | ||
/*! http-post-message v0.1.1 | (c) 2016 Microsoft Corporation MIT */ | ||
/*! http-post-message v0.1.2 | (c) 2016 Microsoft Corporation MIT */ | ||
export interface IHttpPostMessageRequest { | ||
@@ -3,0 +3,0 @@ method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE"; |
@@ -1,2 +0,2 @@ | ||
/*! http-post-message v0.1.1 | (c) 2016 Microsoft Corporation MIT */ | ||
/*! http-post-message v0.1.2 | (c) 2016 Microsoft Corporation MIT */ | ||
(function webpackUniversalModuleDefinition(root, factory) { | ||
@@ -77,3 +77,3 @@ if(typeof exports === 'object' && typeof module === 'object') | ||
return { | ||
id: message.headers.id | ||
id: message.headers && message.headers.id | ||
}; | ||
@@ -80,0 +80,0 @@ }; |
@@ -1,2 +0,2 @@ | ||
/*! http-post-message v0.1.1 | (c) 2016 Microsoft Corporation MIT */ | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports["http-post-message"]=e():t["http-post-message"]=e()}(this,function(){return function(t){function e(r){if(o[r])return o[r].exports;var n=o[r]={exports:{},id:r,loaded:!1};return t[r].call(n.exports,n,n.exports,e),n.loaded=!0,n.exports}var o={};return e.m=t,e.c=o,e.p="",e(0)}([function(t,e){"use strict";var o=function(){function t(t,e,o){void 0===o&&(o={}),this.defaultHeaders=o,this.targetWindow=t,this.windowPostMessageProxy=e}return t.addTrackingProperties=function(t,e){return t.headers=t.headers||{},e&&e.id&&(t.headers.id=e.id),t},t.getTrackingProperties=function(t){return{id:t.headers.id}},t.isErrorMessage=function(t){return!(200<=t.statusCode&&t.statusCode<300)},t.prototype.get=function(t,e){return void 0===e&&(e={}),this.send({method:"GET",url:t,headers:e})},t.prototype.post=function(t,e,o){return void 0===o&&(o={}),this.send({method:"POST",url:t,headers:o,body:e})},t.prototype.put=function(t,e,o){return void 0===o&&(o={}),this.send({method:"PUT",url:t,headers:o,body:e})},t.prototype.patch=function(t,e,o){return void 0===o&&(o={}),this.send({method:"PATCH",url:t,headers:o,body:e})},t.prototype["delete"]=function(t,e,o){return void 0===e&&(e=null),void 0===o&&(o={}),this.send({method:"DELETE",url:t,headers:o,body:e})},t.prototype.send=function(t){return this.assign(t.headers,this.defaultHeaders),this.windowPostMessageProxy.postMessage(this.targetWindow,t)},t.prototype.assign=function(t){for(var e=[],o=1;o<arguments.length;o++)e[o-1]=arguments[o];if(void 0===t||null===t)throw new TypeError("Cannot convert undefined or null to object");var r=Object(t);return e.forEach(function(t){if(void 0!==t&&null!==t)for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&(r[e]=t[e])}),r},t}();e.HttpPostMessage=o}])}); | ||
/*! http-post-message v0.1.2 | (c) 2016 Microsoft Corporation MIT */ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["http-post-message"]=t():e["http-post-message"]=t()}(this,function(){return function(e){function t(r){if(o[r])return o[r].exports;var n=o[r]={exports:{},id:r,loaded:!1};return e[r].call(n.exports,n,n.exports,t),n.loaded=!0,n.exports}var o={};return t.m=e,t.c=o,t.p="",t(0)}([function(e,t){"use strict";var o=function(){function e(e,t,o){void 0===o&&(o={}),this.defaultHeaders=o,this.targetWindow=e,this.windowPostMessageProxy=t}return e.addTrackingProperties=function(e,t){return e.headers=e.headers||{},t&&t.id&&(e.headers.id=t.id),e},e.getTrackingProperties=function(e){return{id:e.headers&&e.headers.id}},e.isErrorMessage=function(e){return!(200<=e.statusCode&&e.statusCode<300)},e.prototype.get=function(e,t){return void 0===t&&(t={}),this.send({method:"GET",url:e,headers:t})},e.prototype.post=function(e,t,o){return void 0===o&&(o={}),this.send({method:"POST",url:e,headers:o,body:t})},e.prototype.put=function(e,t,o){return void 0===o&&(o={}),this.send({method:"PUT",url:e,headers:o,body:t})},e.prototype.patch=function(e,t,o){return void 0===o&&(o={}),this.send({method:"PATCH",url:e,headers:o,body:t})},e.prototype["delete"]=function(e,t,o){return void 0===t&&(t=null),void 0===o&&(o={}),this.send({method:"DELETE",url:e,headers:o,body:t})},e.prototype.send=function(e){return this.assign(e.headers,this.defaultHeaders),this.windowPostMessageProxy.postMessage(this.targetWindow,e)},e.prototype.assign=function(e){for(var t=[],o=1;o<arguments.length;o++)t[o-1]=arguments[o];if(void 0===e||null===e)throw new TypeError("Cannot convert undefined or null to object");var r=Object(e);return t.forEach(function(e){if(void 0!==e&&null!==e)for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=e[t])}),r},e}();t.HttpPostMessage=o}])}); |
{ | ||
"name": "http-post-message", | ||
"version": "0.1.1", | ||
"description": "A library to enabled HTTP communication over window.postMessage using window-post-message-proxy. The enables communicating with iframes in a well known protocol and pattern.", | ||
"version": "0.1.2", | ||
"description": "A generic messaging component to send HTTP style message payloads over the window.postMessage API. Requires an implementation of window postMessage proxy such as 'window-post-message-proxy'.", | ||
"main": "dist/httpPostMessage.js", | ||
@@ -13,4 +13,7 @@ "typings": "dist/httpPostMessage.d.ts", | ||
"type": "git", | ||
"url": "https://pbix.visualstudio.com/DefaultCollection/PaaS/_git/http-post-message" | ||
"url": "https://github.com/Microsoft/http-post-message" | ||
}, | ||
"files": [ | ||
"dist" | ||
], | ||
"keywords": [ | ||
@@ -17,0 +20,0 @@ "Microsoft", |
# htt-post-message | ||
A generic messaging component to send HTTP style message payloads over the window.postMessage API. Requires an implementation of window postMessage proxy such as 'window-post-message-proxy'. | ||
A library to enabled HTTP communication over window.postMessage using window-post-message-proxy. The enables communicating with iframes in a well known protocol and pattern. | ||
## Installation | ||
@@ -6,0 +5,0 @@ ``` |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
23118
8
234
37
1