pressly/screenshot-nodejs

REST API query arguments

Closed this issue · 4 comments

GET localhost:{port}/png?url=https://www.google.com&window=500x500&crop=75x80&x=350&y=190

  1. Do we assume that the URL is url_encoded?
  2. Or is localhost:{port}/png?window=500x500&crop=75x80&x=350&y=190&url=https://www.google.com?some=third&party=arguments gonna work?
  3. Can we document this in the README and let the url argument to be the last one in all the examples?

Yes, this is a problem currently, I'll make the fix to force it to be at the end

hmm doesn't seem to be a nice way to enforce url to be the last param, other than documenting :/ if that's fine we can leave it at that, if this will only be used through the client, url encoding should work well no?

It's fine to enforce url_encoded() value of the url param, if it's documented well :)

in the readme, since it's encoded it doesn't need to be last param