Code Monkey home page Code Monkey logo

inbucket-js-client's Introduction

inbucket-js-client

Simple API client for amazing https://www.inbucket.org/ service

TypeScript typings are included

Supported all base methods from https://github.com/jhillyerd/inbucket/wiki/REST-API :

  • Get inbox
  • Get message
  • Get raw message source
  • Delete message
  • Pruge (wipe) inbox

Legacy methods are not supported

Small example:

import { InbucketAPIClient } from ('./index.js')

const client = new InbucketAPIClient('http://192.168.1.1:9001/'); // your base url
const inbox = await client.mailbox('inboxname') 
const message = await client.message('inboxname', inbox[0].id)
await client.deleteMessage('inboxname', inbox[0].id)

inbucket-js-client's People

Contributors

dependabot[bot] avatar xotabu4 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

dragin96 403-html

inbucket-js-client's Issues

How to force HTTP

Hi,
I'm using Cypress, doing a simple request and it turns out I have https, not http. How can I force the http?

    const client = new InbucketAPIClient(Cypress.env('INBUCKET_URL')); // it has `http://`
    const inbox = await client.mailbox(account);
    const message = await client.message(account, inbox[place ?? 0].id);
    const code = message.body.html.match(/\d{6}/g)?.[0];

    return code;

But I get https:// request
image

Also question:
Isn't this package deprecated due to request-promise-native and request being deprecated (vulnerable)?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.