Skip to content

Commit

Permalink
Merge pull request #783 from nhart12/master
Browse files Browse the repository at this point in the history
Update README.md
  • Loading branch information
Oren Novotny authored Nov 14, 2019
2 parents 87bd209 + 2c77a1d commit 394fd1e
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,19 @@ If the name of your parameter doesn't match the name in the URL path, use the
Task<List<User>> GroupList([AliasAs("id")] int groupId);
```

A request url can also bind replacement blocks to a custom object

```csharp
[Get("/group/{request.groupId}/users/{request.userId}")]
Task<List<User>> GroupList(UserGroupRequest request);

class UserGroupRequest{
int groupId { get;set; }
int userId { get;set; }
}

```

Parameters that are not specified as a URL substitution will automatically be
used as query parameters. This is different than Retrofit, where all
parameters must be explicitly specified.
Expand Down Expand Up @@ -104,6 +117,7 @@ Task<List<Page>> Search(string page);
Search("admin/products");
>>> "/search/admin/products"
```

### Dynamic Querystring Parameters

If you specify an `object` as a query parameter, all public properties which are not null are used as query parameters.
Expand Down

0 comments on commit 394fd1e

Please sign in to comment.