| 
									
										
										
										
											2017-01-29 00:51:47 +01:00
										 |  |  | import * as https from 'https' | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | import * as plugins from './smartrequest.plugins' | 
					
						
							|  |  |  | import * as interfaces from './smartrequest.interfaces' | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | import { request } from './smartrequest.request' | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-01-29 01:12:42 +01:00
										 |  |  | export { request } from './smartrequest.request' | 
					
						
							|  |  |  | export { ISmartRequestOptions } from './smartrequest.interfaces' | 
					
						
							| 
									
										
										
										
											2017-01-29 00:51:47 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-01-29 01:12:42 +01:00
										 |  |  | export let get = async (domainArg: string, optionsArg: interfaces.ISmartRequestOptions = {}) => { | 
					
						
							| 
									
										
										
										
											2017-01-29 00:51:47 +01:00
										 |  |  |     optionsArg.method = 'GET' | 
					
						
							|  |  |  |     let response = await request(domainArg, optionsArg) | 
					
						
							|  |  |  |     return response | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-01-29 01:12:42 +01:00
										 |  |  | export let post = async (domainArg: string, optionsArg: interfaces.ISmartRequestOptions = {}) => { | 
					
						
							| 
									
										
										
										
											2017-01-29 00:51:47 +01:00
										 |  |  |     optionsArg.method = 'POST' | 
					
						
							|  |  |  |     let response = await request(domainArg, optionsArg) | 
					
						
							|  |  |  |     return response | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-01-29 01:12:42 +01:00
										 |  |  | export let put = async (domainArg: string, optionsArg: interfaces.ISmartRequestOptions = {}) => { | 
					
						
							| 
									
										
										
										
											2017-01-29 00:51:47 +01:00
										 |  |  |     optionsArg.method = 'PUT' | 
					
						
							|  |  |  |     let response = await request(domainArg, optionsArg) | 
					
						
							|  |  |  |     return response | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-01-29 01:12:42 +01:00
										 |  |  | export let del = async (domainArg: string, optionsArg: interfaces.ISmartRequestOptions = {}) => { | 
					
						
							| 
									
										
										
										
											2017-01-29 00:51:47 +01:00
										 |  |  |     optionsArg.method = 'DELETE' | 
					
						
							|  |  |  |     let response = await request(domainArg, optionsArg) | 
					
						
							|  |  |  |     return response | 
					
						
							|  |  |  | } |