Perform HTTP requests
Signature | hs.http.htmlEntities[] |
---|---|
Type | Variable |
Description |
A collection of common HTML Entities (&whatever;) and their UTF8 equivalents. To retrieve the UTF8 sequence for a given entity, reference the table as |
Notes |
|
Source | extensions/http/http.lua line 144 |
Signature | hs.http.asyncGet(url, headers, callback) |
---|---|
Type | Function |
Description |
Sends an HTTP GET request asynchronously |
Parameters |
|
Returns |
|
Notes |
|
Source | extensions/http/http.lua line 76 |
Signature | hs.http.asyncPost(url, data, headers, callback) |
---|---|
Type | Function |
Description |
Sends an HTTP POST request asynchronously |
Parameters |
|
Returns |
|
Notes |
|
Source | extensions/http/http.lua line 98 |
Signature | hs.http.asyncPut(url, data, headers, callback) |
---|---|
Type | Function |
Description |
Sends an HTTP PUT request asynchronously |
Parameters |
|
Returns |
|
Notes |
|
Source | extensions/http/http.lua line 121 |
Signature | hs.http.convertHtmlEntities(inString) -> outString |
---|---|
Type | Function |
Description |
Convert all recognized HTML Entities in the |
Parameters |
|
Returns |
|
Notes |
|
Source | extensions/http/http.lua line 444 |
Signature | hs.http.doAsyncRequest(url, method, data, headers, callback, [cachePolicy|enableRedirect]) |
---|---|
Type | Function |
Description |
Creates an HTTP request and executes it asynchronously |
Parameters |
|
Returns |
|
Notes |
|
Source | extensions/http/libhttp.m line 201 |
Signature | hs.http.doRequest(url, method, [data, headers, cachePolicy]) -> int, string, table |
---|---|
Type | Function |
Description |
Creates an HTTP request and executes it synchronously |
Parameters |
|
Returns |
|
Notes |
|
Source | extensions/http/libhttp.m line 264 |
Signature | hs.http.encodeForQuery(string) -> string |
---|---|
Type | Function |
Description |
Returns a copy of the provided string in which characters that are not valid within an HTTP query key or value are escaped with their %## equivalent. |
Parameters |
|
Returns |
|
Notes |
|
Source | extensions/http/http.lua line 461 |
Signature | hs.http.get(url, headers) -> int, string, table |
---|---|
Type | Function |
Description |
Sends an HTTP GET request to a URL |
Parameters |
|
Returns |
|
Notes |
|
Source | extensions/http/http.lua line 11 |
Signature | hs.http.post(url, data, headers) -> int, string, table |
---|---|
Type | Function |
Description |
Sends an HTTP POST request to a URL |
Parameters |
|
Returns |
|
Notes |
|
Source | extensions/http/http.lua line 32 |
Signature | hs.http.put(url, data, headers) -> int, string, table |
---|---|
Type | Function |
Description |
Sends an HTTP PUT request to a URL |
Parameters |
|
Returns |
|
Notes |
|
Source | extensions/http/http.lua line 54 |
Signature | hs.http.registerEntity(entity, codepoint) -> string |
---|---|
Type | Function |
Description |
Registers an HTML Entity with the specified Unicode codepoint which can later referenced in your code as |
Parameters |
|
Returns |
|
Notes |
|
Source | extensions/http/http.lua line 419 |
Signature | hs.http.urlParts(url) -> table |
---|---|
Type | Function |
Description |
Returns a table of keys containing the individual components of the provided url. |
Parameters |
|
Returns |
|
Notes |
|
Source | extensions/http/libhttp.m line 332 |
© 2014–2017 Hammerspoon contributors
Licensed under the MIT License.
https://www.hammerspoon.org/docs/hs.http.html