B4X FEED Re: How call APIs written in PHP for Get, Post, Put, Delete methods

اطلاعات موضوع

درباره موضوع در تاریخ, در دسته b4xfeed ایجاد شده و آغاز کننده آن practicalsoftمی باشد و موضوع آن: Re: How call APIs written in PHP for Get, Post, Put, Delete methods است. این موضوع تا کنون 38 بازدید کننده و, 0 پاسخ داشته و 0 بار پسندیده شده...
نام دسته b4xfeed
نام موضوع Re: How call APIs written in PHP for Get, Post, Put, Delete methods
آغاز کننده موضوع practicalsoft
تاریخ شروع
پاسخ‌ها
0
بازدیدها
38
پسندها
0
آخرین ارسال توسط PracticalSoft
Jun 6, 2020
11,559
4,422
Hello,
In PHP (with slim framework), we have the following methods
$app->POST('/users', \App\Action\UserCreateAction::class);
$app->PUT('/users', \App\Action\UserUpdateAction::class);
$app->DELETE('/users', \App\Action\UserDeleteAction::class);
$app->GET('/user', \App\Action\UserReadAction::class);
$app->GET('/users', \App\Action\UserListAction::class);

For all the above method(s), The data sent to the server with POST. Yes, additional data need to be sent with POST only even for DELETE, GET, PUT also.

Now we need to call those methods from B4A,
What we could find in B4A, is PostString, PutString, Download, Download2, Delete & Delete2

We could successfully add data by calling POST users using PostString.
We could successfully update data by calling PUT users using PutString

For both Download2, Delete2 we could not send additional data though POST http method. As additional data is a must, we need some way where we can...



 

عقب
بالا