Root namespace for http specifics
- Since:
-
- 0.2.1
Members
-
<static, readonly> methods :enum
-
HTTP methods enumeration
Type:
- enum
- Since:
-
- 0.2.1
Properties:
Name Type Description get
enum GET
post
enum POST
put
enum PUT
options
enum OPTIONS
delete
enum DELETE
head
enum HEAD
Methods
-
<static> delete(urlOrRequest)
-
HTTP DELETE request
Parameters:
Name Type Description urlOrRequest
String | gpf.typedef.httpRequestSettings URL or HTTP Request settings
- Since:
-
- 0.2.1
Returns:
Resolved on request completion
- Type
- Promise.<gpf.typedef.httpRequestResponse>
-
<static> get(urlOrRequest)
-
HTTP GET request
Parameters:
Name Type Description urlOrRequest
String | gpf.typedef.httpRequestSettings URL or HTTP Request settings
- Since:
-
- 0.2.1
Returns:
Resolved on request completion
- Type
- Promise.<gpf.typedef.httpRequestResponse>
-
<static> head(urlOrRequest)
-
HTTP HEAD request
Parameters:
Name Type Description urlOrRequest
String | gpf.typedef.httpRequestSettings URL or HTTP Request settings
- Since:
-
- 0.2.2
Returns:
Resolved on request completion
- Type
- Promise.<gpf.typedef.httpRequestResponse>
-
<static> mock(definition)
-
Add a mocked request
Parameters:
Name Type Description definition
gpf.typedef.mockedRequest Mocked request definition
- Since:
-
- 0.2.2
Returns:
Mocked request identifier, to be used with gpf.http.mock.remove
-
<static> options(urlOrRequest)
-
HTTP OPTIONS request
Parameters:
Name Type Description urlOrRequest
String | gpf.typedef.httpRequestSettings URL or HTTP Request settings
- Since:
-
- 0.2.1
Returns:
Resolved on request completion
- Type
- Promise.<gpf.typedef.httpRequestResponse>
-
<static> post(urlOrRequest, data)
-
HTTP POST request
Parameters:
Name Type Description urlOrRequest
String | gpf.typedef.httpRequestSettings URL or HTTP Request settings
data
String Data to POST
- Since:
-
- 0.2.1
Returns:
Resolved on request completion
- Type
- Promise.<gpf.typedef.httpRequestResponse>
-
<static> put(urlOrRequest, data)
-
HTTP PUT request
Parameters:
Name Type Description urlOrRequest
String | gpf.typedef.httpRequestSettings URL or HTTP Request settings
data
String Data to PUT
- Since:
-
- 0.2.1
Returns:
Resolved on request completion
- Type
- Promise.<gpf.typedef.httpRequestResponse>
-
<static> request(request)
-
HTTP request common implementation
Parameters:
Name Type Description request
gpf.typedef.httpRequestSettings HTTP Request settings
- Since:
-
- 0.2.1
Returns:
Resolved on request completion
- Type
- Promise.<gpf.typedef.httpRequestResponse>