Uh oh! We couldn’t find any match.

Please try other search keywords.

Bixby Developer Center

Guides

http

Provides helper methods for HTTP requests.

Note

All calls in the HTTP module are made synchronously and will wait until a system-defined timeout. It is usually not appropriate to wrap HTTP calls from Bixby in promises or callbacks. All methods accept both HTTP and HTTPS (secure) URLs.

http.makeQueryString(args) ⇒ String

Return a properly-formatted query string.

Kind: Static method of http
Access: Public

ParamType
argsObject

The object key-value pairs are used as the query parameter keys and values. Values will be URL-encoded. You can pass this object to http.makeQueryString():

{"color": "red", "flavor": "peppermint stick"}

The queryString returned is:

color=red&flavor=peppermint%20stick

http.getUrl(url, options) ⇒ String

Perform an HTTP GET request.

Kind: Static method of http
Access: Public

ParamTypeDescription
urlString
[options]ObjectSee below

The object can have any of these keys:

  • format: Output format.
  • query: Object containing unencoded keys and values for URL query string.
  • cacheTime: Cache time in milliseconds.
  • basicAuth: Basic Authentication; value must be an object with username and password.

http.postUrl(url, params, options)

Perform an HTTP POST request.

Kind: Static method of http

Supports params and options from getUrl(), plus the following:

  • passAsJson: If true, pass the request parameters in the body in JSON format.
ParamTypeDescription
urlString
paramsObjectUnencoded keys and values for the POST body
optionsObject 

http.deleteUrl(url, params, options) ⇒ String

Perform an HTTP DELETE request.

Kind: Static method of http

Supports params and options from getUrl(), plus the following:

  • passAsJson: If true, pass the request parameters in the body in JSON format
ParamTypeDescription
urlString
paramsObjectUnencoded keys and values for the DELETE body
optionsObject 

http.patchUrl(url, params, options) ⇒ String

Perform an HTTP PATCH request.

Kind: Static method of http

Supports params and options from getUrl(), plus the following:

  • passAsJson: If true, pass the request parameters in the body in JSON format
ParamTypeDescription
urlString
paramsObjectUnencoded keys and values for the POST body.
optionsObject 

http.putUrl(url, params, options) ⇒ String

Perform an HTTP PUT request.

Kind: Static method of http

Supports params and options from getUrl(), plus the following:

  • passAsJson: If true, pass the request parameters in the body in JSON format
ParamTypeDescription
urlString
paramsObjectUnencoded keys and values for the POST body.
optionsObject 

http.oauthGetUrl(url, options) ⇒ String

Perform an HTTP GET request, signed with the Oauth appropriate access keys. (See Implementing JavaScript Actions for details.)

Kind: Static method of http
Access: Public

See getUrl() for params and options.

ParamType
urlString
optionsObject

http.oauthDeleteUrl(url, params, options) ⇒ String

Perform an HTTP DELETE request, signed with the Oauth appropriate access keys. (See Implementing JavaScript Actions for details.)

Kind: Static method of http
Access: Public

ParamType
urlString
params
optionsObject

See deleteUrl() for params and options.

http.oauthPostUrl(url, params, options) ⇒ String

Perform an HTTP POST request, signed with the Oauth appropriate access keys. (See Implementing JavaScript Actions for details.)

Kind: Static method of http
Access: Public

See postUrl() for params and options.

ParamType
urlString
params
optionsObject

http.oauthPatchUrl(url, params, options) ⇒ String

Perform an HTTP PATCH request, signed with the Oauth appropriate access keys. (See Implementing JavaScript Actions for details.)

Kind: Static method of http
Access: Public

See patchUrl() for params and options.

ParamType
urlString
params
optionsObject

http.oauthPutUrl(url, params, options) ⇒ String

Perform an HTTP PUT request, signed with the Oauth appropriate access keys. (See Implementing JavaScript Actions for details.)

Kind: Static method of http
Access: Public

See putUrl() for params and options.

ParamType
urlString
params
optionsObject

http.spsProxyPost(options)

Delivers an SPS payment via an HTTP POST request. For more information, see the Supporting Payments topic.

Kind: Static method of http

ParamType
optionsObject

In the capsule's local JavaScript, you should define the options parameter like the following:

var options = {}
options.headers = {
"Content-Type" : "application/json",
"request_num" : "1"
}
options.body = {
"heyTicketmasterCreateMyWallet": "just do it",
"card_number": "{{credit_card_number}}"
}
options.url = "https://postman-echo.com/post" // optional, can also be specified via `sps` in `endpoints`
var response = http.spsProxyPost(options)

http.spsProxyPut(options)

Delivers an SPS payment via an HTTP PUT request. For more information, see the Supporting Payments topic.

Kind: Static method of http

Same parameters as http.spsProxyPost

ParamType
optionsObject