Giter Site home page Giter Site logo

rug-function-http's Introduction

Atomist 'rug-function-http'

Build Status

HTTP Rug Function based on https://github.com/dakrone/clj-http

Parameters

  • url: string - Used for all methods
  • method: string - One of get, post, put, head and delete
  • config: object(map) - JSON serializable datastructure representing the rest of the request

Whitelisting

Currently we employ strict URL whitelisting to all requests. Below is the current static whitelist:

  {
     :github         {:patterns #{"^https://api\\.github\\.com/.*$"}}
     :google         {:patterns #{"^https://www\\.googleapis\\.com/.*$"}}
     :heroku         {:patterns #{"^https://api\\.heroku\\.com/.*$"}}
     :stack-overflow {:patterns #{"^http://api\\.stackexchange\\.com/.*$"}}
     :yahoo          {:patterns #{"^http://query\\.yahooapis\\.com/.*$"}}
     :lebowski       {:patterns #{"^http://lebowski\\.me/.*$"}}
     :xkcd           {:patterns #{"^http://xkcd\\.com/.*$"}}
     :npm            {:patterns #{"^https://registry\\.npmjs\\.org/.*$"}}
     :jfrog          {:patterns #{"^https://.+?\\.jfrog\\.io/.*$"}}
     :aws            {:patterns #{"^https://.+?\\.amazonaws\\.com/.*$"}}
     :slack          {:patterns #{"^https://slack\\.com/api/.*$"}}}

The static list above can be merged with an external list from a file who's name is specified by a system property.

e.g.

java -Dhttp.whitelist.file=/etc/whitelist.edn

**NOTE: If there are duplicate keys in the file, the values from the file overwrite those in the above static list.

Support

General support questions should be discussed in the #support channel on our community Slack team at atomist-community.slack.com.

If you find a problem, please create an issue.

Building

$ boot build

Testing

$ boot build midje

All invocations of boot will generate a Lein project.clj for editors and IDEs that need it

Releasing

To create a new release of the project, simply push a tag of the form M.N.P where M, N, and P are integers that form the next appropriate semantic version for release. For example:

$ git tag -a 1.2.3

The Travis CI build (see badge at the top of this page) will automatically create a GitHub release using the tag name for the release and the comment provided on the annotated tag as the contents of the release notes. It will also automatically upload the needed artifacts.


Created by Atomist. Need Help? Join our Slack team.

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.