question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[HttpPost] being ignored on IAppService methods

See original GitHub issue

I am trying to make one of my Get requests a Post request instead (it has complex objects in the Input dto).

https://aspnetboilerplate.com/Pages/Documents/Dynamic-Web-API#http-attributes

Problem number 1 is that the documentation says that Microsoft.AspNet.WebApi.Core package is needed, and I have this on my Application project, yet when I type HttpPost no references to it appear. So is the documentation wrong? Or is this a needed package, but the Attribute doesn’t come from there?

Problem 2 is I cannot get it to ignore the Get request with attributes: I checked though past projects and found this sample: https://github.com/aspnetboilerplate/aspnetboilerplate-samples/blob/8a104f0b22298f8d4d4ce2d2f6bf6f62b8bc1e19/AbpSwaggerDemo/AbpSwagger.Application/Students/IStudentAppService.cs#L5

So it seems I am doing it the right way, yet it remains a Get request according to Swagger etc.

Is something amiss with the documentation?

I also downloaded a new project(october) and tried the same thing, it wouldn’t work.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
worthy7commented, Dec 4, 2020

Ah, so I am using the wrong package that’s why. Sorry I misunderstood - thanks!

0reactions
malimingcommented, Dec 4, 2020

image

image

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I ignore (not respond) to a Web Service request?
I have a web service (Java/WebSphere 8.0) that is receiving duplicated SOAP messages and I am exploring various ways to handle these duplicated ......
Read more >
pages ignore HTTP method -- is this desirable? #1175
I recently noticed that SvelteKit matches pages on path alone and ignores the HTTP method. For example, if you create routes/foo.svelte, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found