solidusjs / solidus

A simple server that generates pages from JSON and Templates
MIT License
28 stars 7 forks source link

Centralized resource options #77

Closed Fauntleroy closed 10 years ago

Fauntleroy commented 10 years ago

Basically what we talked about in https://github.com/SparkartGroupInc/solidus/pull/74

You have an auth.json which contains resource options to be mixed in before requests are made:

{
    "https://hipster2.sparkart.net/*": {
        "headers": {
            "key": "12345"
        }
    },
    "https://hipster3.sparkart.net/*": {
        "query": {
            "key": "12345"
        }
    }
}

And resources are defined as they always have been. You can also define resources with objects from the https://github.com/SparkartGroupInc/solidus/pull/73 branch. Possible resource options are: headers, query, and auth

pushred commented 10 years ago

No comments on the refactors, that all seems to make sense. Confirmed it works as expected in use with @krackydile by using this branch on the Immunity Project site he's working on.

pushred commented 10 years ago

Oh yeah he's also using helpers now since they're in master.