Comments (2)
@soggie Sorry for the delay in getting back to you, but this is actually by design, but there is an easy solution. The underlying request
module that api-easy
uses will by default follow 302 redirects.
So when you redirect to google.com
it actually goes there and gets the 200
from google. You just have to tell your suite not to follow redirects.
suite.discuss('GIVEN that I want to check the server\'s basic REST API')
.use('localhost', 9000)
.followRedirect(false)
.path('/')
.get()
.expect(302);
from api-easy.
Thanks. I kind of figured this out few hours after I logged this issue by combing the source code, but forgot to update this issue. Thanks!
from api-easy.
Related Issues (20)
- Recursive calls Examples HOT 8
- "Content-Type" header with GET request HOT 2
- Please update vows version
- How to use the same tests in different environments (dev, beta, staging etc.)
- offtopic: why do you parse params like this HOT 2
- API-easy not compatible with latest versions of node? HOT 3
- Unable to stall tests until connections are made HOT 3
- Cannot post a body that is not an object HOT 3
- Permission denied when running the test HOT 4
- Unable to pass data (and update POST data) between chained APIEasy calls. HOT 3
- api-easy usage with Express (node lib) HOT 2
- .put() does not work as expected HOT 1
- i get error ECONNREFUSED. HOT 1
- No way to tests API over SSL HOT 2
- Question: using for a smoke test
- Asynchonous error HOT 1
- How do I test multipart requests with apieasy?
- afters
- Broken doc page HOT 1
- Test Execution Reports
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from api-easy.