Giter Site home page Giter Site logo

script-libraries's People

Contributors

heitortsergent avatar johnsheehan avatar nkjoep avatar sqdk avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

ibotta

script-libraries's Issues

Add method to build `path` variable

Suggested on #3. Relevant code snippet:

var path = '/?';
for (var key in request.params) {
    path += request.params[key].name + "=" + request.params[key].value + "&"; // Notice that there is currently no support for array values
}

Example with path parameters doesn't work

as the example has delimiter=/ the provided code doesn't work.

here is my solution

var fullPath = request.url.replace(request.scheme+'://'+request.host, '');

var opts = {service: 's3', host: request.host, path: fullPath, region:'eu-west-1'};
var awsObj = aws4.sign(opts, {accessKeyId: variables.get("AWS_ACCESS_KEY_ID"), secretAccessKey: variables.get("AWS_SECRET_ACCESS_KEY")});

request.path = awsObj.path;

for (var header in awsObj.headers) {
    request.headers[header] = awsObj.headers[header];
}

replace scheme and host. the rest of the URL will be path+params

also, region is detected poorly with this implementation. i had to set it explicitly as i was getting error that s3-eu-west-1 is not a valid region

Support for cheeriojs?

Hello,

Do you have support for cheerio in your platform?
If not, do you have any advice on how to validate or parse html fragments from the response?

We have tests with mixed apis returning both json and html and I was wondering what is the best way to extract values from the html strings.
For that purpose I usually cheerio with nodejs in my tests and we'd like to move those tests to Runscope.

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.