http-post-message
Advanced tools
Comparing version 0.2.0 to 0.2.1
@@ -1,2 +0,2 @@ | ||
/*! http-post-message v0.2.0 | (c) 2016 Microsoft Corporation MIT */ | ||
/*! http-post-message v0.2.1 | (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.2.0 | (c) 2016 Microsoft Corporation MIT */ | ||
/*! http-post-message v0.2.1 | (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.2.0 | (c) 2016 Microsoft Corporation MIT */ | ||
/*! http-post-message v0.2.1 | (c) 2016 Microsoft Corporation MIT */ | ||
(function webpackUniversalModuleDefinition(root, factory) { | ||
@@ -3,0 +3,0 @@ if(typeof exports === 'object' && typeof module === 'object') |
@@ -1,2 +0,2 @@ | ||
/*! http-post-message v0.2.0 | (c) 2016 Microsoft Corporation MIT */ | ||
/*! http-post-message v0.2.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===e&&(e={}),this.defaultHeaders=e,this.defaultTargetWindow=o,this.windowPostMessageProxy=t}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&&t.headers.id}},t.isErrorMessage=function(t){return"number"!=typeof(t&&t.statusCode)?!1:!(200<=t.statusCode&&t.statusCode<300)},t.prototype.get=function(t,e,o){return void 0===e&&(e={}),void 0===o&&(o=this.defaultTargetWindow),this.send({method:"GET",url:t,headers:e},o)},t.prototype.post=function(t,e,o,r){return void 0===o&&(o={}),void 0===r&&(r=this.defaultTargetWindow),this.send({method:"POST",url:t,headers:o,body:e},r)},t.prototype.put=function(t,e,o,r){return void 0===o&&(o={}),void 0===r&&(r=this.defaultTargetWindow),this.send({method:"PUT",url:t,headers:o,body:e},r)},t.prototype.patch=function(t,e,o,r){return void 0===o&&(o={}),void 0===r&&(r=this.defaultTargetWindow),this.send({method:"PATCH",url:t,headers:o,body:e},r)},t.prototype["delete"]=function(t,e,o,r){return void 0===e&&(e=null),void 0===o&&(o={}),void 0===r&&(r=this.defaultTargetWindow),this.send({method:"DELETE",url:t,headers:o,body:e},r)},t.prototype.send=function(t,e){if(void 0===e&&(e=this.defaultTargetWindow),t.headers=this.assign({},this.defaultHeaders,t.headers),!e)throw new Error("target window is not provided. You must either provide the target window explicitly as argument to request, or specify default target window when constructing instance of this class.");return this.windowPostMessageProxy.postMessage(e,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}])}); |
{ | ||
"name": "http-post-message", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"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'.", | ||
@@ -34,2 +34,3 @@ "main": "dist/httpPostMessage.js", | ||
"gulp": "^3.9.1", | ||
"gulp-gh-pages": "^0.5.4", | ||
"gulp-header": "^1.8.7", | ||
@@ -39,2 +40,3 @@ "gulp-help": "^1.6.1", | ||
"gulp-replace": "^0.5.4", | ||
"gulp-typedoc": "^2.0.0", | ||
"gulp-uglify": "^1.5.3", | ||
@@ -50,5 +52,7 @@ "jasmine": "^2.4.1", | ||
"karma-spec-reporter": "0.0.26", | ||
"moment": "^2.14.1", | ||
"phantomjs-prebuilt": "^2.1.7", | ||
"run-sequence": "^1.1.5", | ||
"ts-loader": "^0.8.2", | ||
"typedoc": "^0.4.4", | ||
"webpack-stream": "^3.2.0", | ||
@@ -55,0 +59,0 @@ "yargs": "^4.7.0" |
@@ -7,3 +7,4 @@ # htt-post-message | ||
## Installation | ||
``` | ||
```bash | ||
npm install -g http-post-message | ||
@@ -18,3 +19,3 @@ ``` | ||
``` | ||
```typescript | ||
import * as hpm from 'http-post-message'; | ||
@@ -21,0 +22,0 @@ |
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
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
26916
40
25