ddliu / gulp-remote-src

Remote gulp.src
MIT License
20 stars 6 forks source link

Check status code logic is a bit severe #6

Closed alberto-bottarini closed 8 years ago

alberto-bottarini commented 8 years ago

Hi, I'm using gulp-remote-src to trigger jenkins tasks via http request. When everything is ok, Jenkins responds with a 201 response but i get a fail message about status code "failed with status code:201".

Why are you checking exactly if it's 200? Wouldn't it be better if it checks only if statusCode starts with "2"?

ddliu commented 8 years ago

It's originally used for download purpose, so I only considered 200.

Sure 2xx looks OK as well. I'll add them.

alberto-bottarini commented 8 years ago

:+1: :+1: :+1: :+1: