Skip to content

Commit 795a0fa

Browse files
authored
Update README.md
1 parent 0b23741 commit 795a0fa

File tree

1 file changed

+26
-6
lines changed

1 file changed

+26
-6
lines changed

README.md

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@ FakeApi provides the ability to send HttpWebRequest and get HttpWebResponses wit
1818

1919
FakeApi is for you!
2020

21-
# Oldest versions documentation
21+
# Oldest versions documentations
2222

23-
[v1.1.x](https://github.com/redisdev/FakeApi/tree/v1.1.1)
23+
- [v1.0.x](https://github.com/redisdev/FakeApi/tree/v1.0.3)
24+
- [v1.1.x](https://github.com/redisdev/FakeApi/tree/v1.1.1)
25+
- [v1.2.x](https://github.com/redisdev/FakeApi/tree/v1.2.0)
2426

25-
# v1.2.0 Release note
27+
# v1.3.0 Release note
2628

27-
- Improvement of configuration files reading
28-
- Adding the capability to split the api configurations files into multilpe files. Please read 'Organize your configurations files' section
29-
- Adding a default implementation of IHttpRequester
29+
- You can now define several result files for each API. Please read 'How to return data from file?' section.
3030

3131
# How to use FakeApi?
3232

@@ -130,6 +130,26 @@ Simply set the "file" property into your api configuration:
130130
}
131131
```
132132

133+
If you want to return different data each time you call one of your APIs, then you can define several result files :
134+
135+
```json
136+
{
137+
"url": "https://localhost/api/users?pIndex={0}&pSize={1}",
138+
"responses": [
139+
{
140+
"active": 1,
141+
"files": [
142+
"Config/Api/User/Response/searchUsersPage0.json",
143+
"Config/Api/User/Response/searchUsersPage1.json",
144+
"Config/Api/User/Response/searchUsersPage2.json"
145+
]
146+
}
147+
]
148+
}
149+
150+
```
151+
At the first call the data of the first file will be returned then the second to the second call etc ... This type of configuration can be useful for paged requests.
152+
133153
- #### How to add cookie and header?
134154

135155
You can add cookies and headers into HttpWebResponse:

0 commit comments

Comments
 (0)