Click here to Skip to main content
15,880,469 members
Home / Discussions / Web Development
   

Web Development

 
QuestionChanging documentroot in Apache http.conf file causes PHP to stop working Pin
MontanaMan9-Oct-20 16:58
MontanaMan9-Oct-20 16:58 
AnswerRe: Changing documentroot in Apache http.conf file causes PHP to stop working Pin
Graham Breach9-Oct-20 22:14
Graham Breach9-Oct-20 22:14 
GeneralRe: Changing documentroot in Apache http.conf file causes PHP to stop working Pin
MontanaMan10-Oct-20 3:18
MontanaMan10-Oct-20 3:18 
Questionadding colors css file? Pin
auting826-Oct-20 5:24
auting826-Oct-20 5:24 
AnswerRe: adding colors css file? Pin
Richard MacCutchan9-Oct-20 21:59
mveRichard MacCutchan9-Oct-20 21:59 
AnswerRe: adding colors css file? Pin
W Balboos, GHB10-Nov-20 4:34
W Balboos, GHB10-Nov-20 4:34 
QuestionASP.net Web API Errors Pin
Kevin Marois29-Sep-20 10:53
professionalKevin Marois29-Sep-20 10:53 
AnswerRe: ASP.net Web API Errors Pin
Afzaal Ahmad Zeeshan29-Sep-20 11:20
professionalAfzaal Ahmad Zeeshan29-Sep-20 11:20 
Quote:
What am I doing wrong here?
You are not returning anything from the controller, hence the "No Content" is being shown on the client-side.

If you want to see something, try returning that value from the controller instead. For example, in your Delete method, return a string stating that the object has been deleted.
C#
[HttpDelete]
public string Delete(int id)
{
   // delete the object
   return $"Object with ID {id} has been deleted.";
}
Now, this should return a string value. Similarly, modify other methods as well so they also return a proper response instead of a void telling the browser to not print anything.

With an API, you are able to return complex objects as well and the API will automatically serialize the results in a JSON document format that can be used on the client-side to provide a clear response.

Please see these two tutorials:
How do I get ASP.NET Web API to return JSON instead of XML using Chrome? - Stack Overflow
Format response data in ASP.NET Core Web API | Microsoft Docs
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~

GeneralRe: ASP.net Web API Errors Pin
Kevin Marois29-Sep-20 11:28
professionalKevin Marois29-Sep-20 11:28 
AnswerRe: ASP.net Web API Errors Pin
Richard Deeming29-Sep-20 21:27
mveRichard Deeming29-Sep-20 21:27 
GeneralRe: ASP.net Web API Errors Pin
Kevin Marois30-Sep-20 5:48
professionalKevin Marois30-Sep-20 5:48 
GeneralRe: ASP.net Web API Errors Pin
Richard Deeming30-Sep-20 6:50
mveRichard Deeming30-Sep-20 6:50 
NewsCoding multiple text blocks over a single image in HTML Pin
Member 1495060328-Sep-20 5:40
Member 1495060328-Sep-20 5:40 
Questionhello! I wanted to ask how should we code the domain code ourselves? That is, to register a domain for our website and not to get it from somewhere else? What to learn for it Or what book he read Pin
Member 1493949715-Sep-20 20:56
Member 1493949715-Sep-20 20:56 
AnswerRe: hello! I wanted to ask how should we code the domain code ourselves? That is, to register a domain for our website and not to get it from somewhere else? What to learn for it Or what book he read Pin
Richard MacCutchan15-Sep-20 21:34
mveRichard MacCutchan15-Sep-20 21:34 
Answerok, thanks Pin
Member 1493949715-Sep-20 21:39
Member 1493949715-Sep-20 21:39 
SuggestionRe: Domain registration Pin
Richard Deeming15-Sep-20 22:01
mveRichard Deeming15-Sep-20 22:01 
Questionvisualization of data on a website, where the data is provided by some remote C++ program Pin
Arist0tle11-Sep-20 5:44
Arist0tle11-Sep-20 5:44 
AnswerRe: visualization of data on a website, where the data is provided by some remote C++ program Pin
professor tourneseul17-Mar-21 7:50
professor tourneseul17-Mar-21 7:50 
QuestionKENDO GRID with PAGING, SORTING, FILTERING , CUSTOMIZATION Pin
sagarpallavi9-Sep-20 21:40
sagarpallavi9-Sep-20 21:40 
QuestionHI Everyone Pin
Sarbjit Grewal6-Sep-20 18:20
professionalSarbjit Grewal6-Sep-20 18:20 
AnswerRe: HI Everyone Pin
Sandeep Mewara6-Sep-20 19:03
mveSandeep Mewara6-Sep-20 19:03 
QuestionWordpress to html software, So I can code it freely (live option?) Pin
Dr3am'R6-Sep-20 4:58
Dr3am'R6-Sep-20 4:58 
AnswerRe: Wordpress to html software, So I can code it freely (live option?) Pin
Sandeep Mewara6-Sep-20 19:07
mveSandeep Mewara6-Sep-20 19:07 
QuestionSimple Question on Http Verbs Pin
Kevin Marois31-Aug-20 7:00
professionalKevin Marois31-Aug-20 7:00 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.