@@ -54,7 +54,7 @@ public async Task<ToDoItem> AddAsync(ToDoItem todo)
54
54
55
55
var jsonRequest = JsonConvert . SerializeObject ( todo ) ;
56
56
var jsoncontent = new StringContent ( jsonRequest , Encoding . UTF8 , "application/json" ) ;
57
- var response = await this . _httpClient . PostAsync ( $ "{ _TodoListBaseAddress } / api/todolist", jsoncontent ) ;
57
+ var response = await this . _httpClient . PostAsync ( $ "{ _TodoListBaseAddress } api/todolist", jsoncontent ) ;
58
58
59
59
if ( response . StatusCode == HttpStatusCode . OK )
60
60
{
@@ -71,7 +71,7 @@ public async Task DeleteAsync(int id)
71
71
{
72
72
await PrepareAuthenticatedClient ( ) ;
73
73
74
- var response = await _httpClient . DeleteAsync ( $ "{ _TodoListBaseAddress } / api/todolist/{ id } ") ;
74
+ var response = await _httpClient . DeleteAsync ( $ "{ _TodoListBaseAddress } api/todolist/{ id } ") ;
75
75
76
76
if ( response . StatusCode == HttpStatusCode . OK )
77
77
{
@@ -87,7 +87,7 @@ public async Task<ToDoItem> EditAsync(ToDoItem todo)
87
87
88
88
var jsonRequest = JsonConvert . SerializeObject ( todo ) ;
89
89
var jsoncontent = new StringContent ( jsonRequest , Encoding . UTF8 , "application/json-patch+json" ) ;
90
- var response = await _httpClient . PutAsync ( $ "{ _TodoListBaseAddress } / api/todolist/{ todo . Id } ", jsoncontent ) ;
90
+ var response = await _httpClient . PutAsync ( $ "{ _TodoListBaseAddress } api/todolist/{ todo . Id } ", jsoncontent ) ;
91
91
92
92
if ( response . StatusCode == HttpStatusCode . OK )
93
93
{
@@ -103,7 +103,7 @@ public async Task<ToDoItem> EditAsync(ToDoItem todo)
103
103
public async Task < IEnumerable < ToDoItem > > GetAsync ( )
104
104
{
105
105
await PrepareAuthenticatedClient ( ) ;
106
- var response = await _httpClient . GetAsync ( $ "{ _TodoListBaseAddress } / api/todolist") ;
106
+ var response = await _httpClient . GetAsync ( $ "{ _TodoListBaseAddress } api/todolist") ;
107
107
if ( response . StatusCode == HttpStatusCode . OK )
108
108
{
109
109
var content = await response . Content . ReadAsStringAsync ( ) ;
@@ -117,7 +117,7 @@ public async Task<IEnumerable<ToDoItem>> GetAsync()
117
117
public async Task < IEnumerable < string > > GetAllUsersAsync ( )
118
118
{
119
119
await PrepareAuthenticatedClient ( ) ;
120
- var response = await _httpClient . GetAsync ( $ "{ _TodoListBaseAddress } / api/todolist/getallusers") ;
120
+ var response = await _httpClient . GetAsync ( $ "{ _TodoListBaseAddress } api/todolist/getallusers") ;
121
121
if ( response . StatusCode == HttpStatusCode . OK )
122
122
{
123
123
var content = await response . Content . ReadAsStringAsync ( ) ;
@@ -136,7 +136,7 @@ public async Task<IEnumerable<string>> GetAllUsersAsync()
136
136
public async Task < ToDoItem > GetAsync ( int id )
137
137
{
138
138
await PrepareAuthenticatedClient ( ) ;
139
- var response = await _httpClient . GetAsync ( $ "{ _TodoListBaseAddress } / api/todolist/{ id } ") ;
139
+ var response = await _httpClient . GetAsync ( $ "{ _TodoListBaseAddress } api/todolist/{ id } ") ;
140
140
if ( response . StatusCode == HttpStatusCode . OK )
141
141
{
142
142
var content = await response . Content . ReadAsStringAsync ( ) ;
0 commit comments