HttpRequest_v3 Op

HttpRequest

Request a json file and output an object (ajax, url, json)



Full Name
  • Ops.Json.HttpRequest_v3
Visibility
  • Core Op - Official cables op
License
  • MIT
AuthorgithubTest Patches


Example Patch Weather API - Example

Makes a request to the MetaWeather API and displays the current temperature. We use a CORS-proxy here to overcome security-problems between HTTP and HTTPS.

To change the city run this in your browser: https://www.metaweather.com/api/location/search/?query=berlin, change the last part (city) and copy the woeid from the response to `Location ID.

Open In Editor

INPUT PORTS


URL (String)
headers (Object)

<p>a key/value-object of additional headers to send</p>

body (String)

<p>an optional body to send (for POST/PATCH/PUT)</p>

HTTP Method index (Number:

<i>integer</i>

)

<p>the http method to use</p>

Content-Type (String)

<p>the content type of the body sent (if any)</p>

Content index (Number:

<i>integer</i>

)
 JSON  String  Binary  Binary Base64 
Auto request (Number:

<i>boolean</i>

)

<p>trigger the request on any value change (or on pagereload)</p>

Send Credentials (Number:

<i>boolean</i>

)

<p>indicates whether or not cross-site Access-Control requests should be made using credentials such as cookies, authorization headers or TLS client certificates. </p>

reload (Trigger)

<p>refresh data from remote (overrides an inactive &quot;auto request&quot;)</p>

OUTPUT PORTS


Response Json Object (Object)
Response String (String)
Response Data Url (String)
Duration MS (Number)
Status Code (Number)
Is Loading (

<i>boolean</i>

Number)

<p>currently loading</p>

Loaded (Trigger)

<p>triggers when finished</p>


Patches using HttpRequest_v3

  • Examples
  • Public
  • My Patches

Changelog


bugfixfix multiple requests loadingstatususer avatarstephan - 2023-05-19 11:53
improvementadd option to allow sending credentials with requestuser avatarstephan - 2024-04-26 11:57
improvement404 Error will be shown as a warning, not an error anymoreuser avatarpandur - 2024-05-14 10:44
featureAdd option to output binary base64 stringuser avatarpandur - 2024-05-22 10:50
improvementFixed loading status for binary requestsuser avatarpandur - 2024-05-22 10:50
improvementJSON parse errors will not throw an exception but show an uiErroruser avatarpandur - 2024-07-30 16:13
improvementShow warning if url is emptyuser avatarpandur - 2024-08-01 08:28