Socket
Book a DemoInstallSign in
Socket

@urbit/http-api

Package Overview
Dependencies
Maintainers
8
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@urbit/http-api

Library to interact with an Urbit ship over HTTP

latest
Source
npmnpm
Version
2.3.0
Version published
Weekly downloads
218
147.73%
Maintainers
8
Weekly downloads
 
Created
Source

Urbit Connector

This project allows you to connect to an Urbit ship via a JavaScript application.

Example

Check out the example directory for examples of how to use this code.

  • Open example/index.html in your browser and follow the instructions there, or
  • With a ship running in the same fashion as indicated in the file above, run node example/index.js

The code for either of these can be found in src/example/browser.js or src/example/node.js, depending on your context.

Design

This library is designed to be useful for node applications that communicate with an urbit running either on the local computer or on a remote one.

The majority of its methods are asynchronous and return Promises. This is due to the non-blocking nature of JavaScript. If used in a React app, response handlers should be bound with this to setState after a message is received.

NOTE

You must enable CORS requests on your urbit for this library to work in browser context. Use +cors-registry to see domains which have made requests to your urbit, and then approve the needed one, e.g. |cors-approve http://zod.arvo.network.

FAQs

Package last updated on 13 Sep 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts