@burstjs/http
Advanced tools
Comparing version 0.0.14 to 0.1.0-rc1
import HttpResponse from './httpResponse'; | ||
import HttpError from './httpError'; | ||
import Http from './http'; | ||
declare class HttpImpl implements Http { | ||
export default class HttpImpl implements Http { | ||
private _clientImpl; | ||
@@ -13,2 +13,1 @@ constructor(baseURL: string); | ||
} | ||
export default HttpImpl; |
import Http from './http'; | ||
declare class HttpMockBuilder { | ||
export default class HttpMockBuilder { | ||
private readonly _httpMock; | ||
@@ -7,3 +7,3 @@ private constructor(); | ||
private onReply; | ||
onThrowError(method: string, status: number, errorMessage: string, data: any, url?: string): HttpMockBuilder; | ||
private onThrowError; | ||
onGetReply(status: number, data: any, url?: string): HttpMockBuilder; | ||
@@ -19,2 +19,1 @@ onGetThrowError(status: number, errorMessage: string, data?: any, url?: string): HttpMockBuilder; | ||
} | ||
export default HttpMockBuilder; |
@@ -1,2 +0,2 @@ | ||
declare class HttpResponse { | ||
export default class HttpResponse { | ||
status: number; | ||
@@ -6,2 +6,1 @@ response: any; | ||
} | ||
export default HttpResponse; |
{ | ||
"name": "@burstjs/http", | ||
"version": "0.0.14", | ||
"version": "0.1.0-rc1", | ||
"description": "Send commands to BURST over HTTP", | ||
@@ -50,3 +50,3 @@ "contributors": [ | ||
}, | ||
"gitHead": "52816c035b215eeff299acec2dc9877ec69622ae", | ||
"gitHead": "474b30eacdc74c568b04f429b0901f3bd9e831a8", | ||
"publishConfig": { | ||
@@ -53,0 +53,0 @@ "access": "public" |
@@ -0,1 +1,2 @@ | ||
/** @module http */ | ||
import HttpResponse from './httpResponse'; | ||
@@ -2,0 +3,0 @@ |
@@ -0,1 +1,3 @@ | ||
/** @module http */ | ||
/** | ||
@@ -2,0 +4,0 @@ *Copyright (c) 2019 Burst Apps Team |
@@ -0,1 +1,3 @@ | ||
/** @module http */ | ||
import axios from 'axios'; | ||
@@ -6,3 +8,6 @@ import HttpResponse from './httpResponse'; | ||
class HttpImpl implements Http { | ||
/** | ||
* Generic Http client | ||
*/ | ||
export default class HttpImpl implements Http { | ||
@@ -67,3 +72,1 @@ private _clientImpl: any; | ||
} | ||
export default HttpImpl; |
@@ -0,1 +1,3 @@ | ||
/** @module http */ | ||
import Http from './http'; | ||
@@ -2,0 +4,0 @@ import HttpResponse from './httpResponse'; |
@@ -0,1 +1,3 @@ | ||
/** @module http */ | ||
import Http from './http'; | ||
@@ -94,3 +96,3 @@ import HttpResponse from './httpResponse'; | ||
*/ | ||
class HttpMockBuilder { | ||
export default class HttpMockBuilder { | ||
@@ -116,3 +118,3 @@ private readonly _httpMock: HttpMock; | ||
public onThrowError(method: string, status: number, errorMessage: string, data: any, url: string = HttpMock.ForAll): HttpMockBuilder { | ||
private onThrowError(method: string, status: number, errorMessage: string, data: any, url: string = HttpMock.ForAll): HttpMockBuilder { | ||
this._httpMock.registerError(method, url, status, errorMessage, data); | ||
@@ -215,3 +217,1 @@ return this; | ||
} | ||
export default HttpMockBuilder; |
@@ -1,5 +0,14 @@ | ||
class HttpResponse { | ||
/** @module http */ | ||
/** | ||
*Copyright (c) 2019 Burst Apps Team | ||
*/ | ||
/** | ||
* Http Response | ||
* | ||
* Returned by Http request | ||
*/ | ||
export default class HttpResponse { | ||
constructor(public status: number, public response: any) {} | ||
} | ||
export default HttpResponse; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
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
50188
992