Click here to Skip to main content
15,893,564 members
Home / Discussions / Web Development
   

Web Development

 
AnswerRe: Eliminating External (Commercial) References/Creating my own design/Stylesheets Pin
jamieereynoldss9-Jun-19 23:51
jamieereynoldss9-Jun-19 23:51 
AnswerRe: Eliminating External (Commercial) References/Creating my own design/Stylesheets Pin
#realJSOP10-Jun-19 5:08
mve#realJSOP10-Jun-19 5:08 
QuestionHow to learn python numpy library easily, which functions are important Pin
Member 144829305-Jun-19 22:54
Member 144829305-Jun-19 22:54 
AnswerRe: How to learn python numpy library easily, which functions are important Pin
User 41802546-Jun-19 3:56
User 41802546-Jun-19 3:56 
SuggestionRe: How to learn python numpy library easily, which functions are important Pin
Richard Deeming6-Jun-19 4:38
mveRichard Deeming6-Jun-19 4:38 
GeneralRe: How to learn python numpy library easily, which functions are important Pin
User 41802546-Jun-19 6:05
User 41802546-Jun-19 6:05 
QuestionPass Guid To Controller Pin
Kevin Marois4-Jun-19 8:37
professionalKevin Marois4-Jun-19 8:37 
AnswerRe: Pass Guid To Controller Pin
Richard Deeming5-Jun-19 12:26
mveRichard Deeming5-Jun-19 12:26 
Have you tried making the request directly from Postman or a similar tool? That should at least narrow down whether the problem is the server or the client.

I've got several API endpoints using Guid parameters, and they just work. The only obvious difference I can see is that I'm using attribute routing:
Attribute Routing in ASP.NET Web API 2 | Microsoft Docs[^]

Eg:

Server:
C#
[RoutePrefix("somePath")]
public class MyController : ApiController
{
    [HttpDelete]
    [Route("{id:guid}")]
    public async Task<IHttpActionResult> Delete(Guid id, CancellationToken cancellationToken) { ... }
}
Client:
C#
private static readonly HttpClient httpClient = new HttpClient
{
    BaseAddress = new Uri("https://mysite/api/")
};

public async Task<bool> Delete(Guid id, CancellationToken cancellationToken = default)
{
    using (var request = new HttpRequestMessage(HttpMethod.Delete, $"somePath/{id:N}"))
    using (var response = await httpClient.SendAsync(request, cancellationToken).ConfigureAwait(false))
    {
        if (response.StatusCode == HttpStatusCode.NotFound) return false;
        response.EnsureSuccessStatusCode();
        return true;
    }
}




"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer

GeneralRe: Pass Guid To Controller Pin
Kevin Marois7-Jun-19 8:03
professionalKevin Marois7-Jun-19 8:03 
GeneralRe: Pass Guid To Controller Pin
Kevin Marois11-Jun-19 12:08
professionalKevin Marois11-Jun-19 12:08 
QuestionConfused about App secrets Pin
Super Lloyd30-May-19 19:32
Super Lloyd30-May-19 19:32 
AnswerRe: Confused about App secrets Pin
Kornfeld Eliyahu Peter2-Jun-19 22:44
professionalKornfeld Eliyahu Peter2-Jun-19 22:44 
AnswerRe: Confused about App secrets Pin
Eddy Vluggen2-Jun-19 23:04
professionalEddy Vluggen2-Jun-19 23:04 
QuestionPowershell script not working suddenly Pin
Member 1447460730-May-19 12:15
Member 1447460730-May-19 12:15 
AnswerRe: Powershell script not working suddenly Pin
Richard Deeming31-May-19 0:48
mveRichard Deeming31-May-19 0:48 
GeneralRe: Powershell script not working suddenly Pin
Member 1447460731-May-19 5:22
Member 1447460731-May-19 5:22 
GeneralRe: Powershell script not working suddenly Pin
Richard Deeming31-May-19 6:05
mveRichard Deeming31-May-19 6:05 
QuestionASP.Net Web API Deployment Not Working Pin
Kevin Marois29-May-19 6:56
professionalKevin Marois29-May-19 6:56 
AnswerRe: ASP.Net Web API Deployment Not Working Pin
Richard Deeming29-May-19 7:21
mveRichard Deeming29-May-19 7:21 
GeneralRe: ASP.Net Web API Deployment Not Working Pin
Kevin Marois29-May-19 7:42
professionalKevin Marois29-May-19 7:42 
GeneralRe: ASP.Net Web API Deployment Not Working Pin
Richard Deeming29-May-19 7:53
mveRichard Deeming29-May-19 7:53 
GeneralRe: ASP.Net Web API Deployment Not Working Pin
Kevin Marois29-May-19 8:12
professionalKevin Marois29-May-19 8:12 
QuestionPhoto Collage in Bootstrap...possible? Pin
Member 1208020129-May-19 6:05
Member 1208020129-May-19 6:05 
AnswerRe: Photo Collage in Bootstrap...possible? Pin
Pete O'Hanlon29-May-19 22:04
mvePete O'Hanlon29-May-19 22:04 
QuestionHandling Web Request Failures Pin
Kevin Marois22-May-19 5:28
professionalKevin Marois22-May-19 5:28 

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.