我有ASP.net应用程序,该应用程序使用OnActionExecuting方法进行模型验证。
[AllowAnonymous]
[HttpGet]
[ValidateModelState,CheckModelForNull]
[Route("api/foodordersystem/SendEmailToCustomer/[EmailAddress]")]
public string SendEmailToCustomerAPI(GeneralData emailAddress)
{
CreateDataConnection();
string stat = "";
我的问题是,actionContext值始终为null。我正在使用swagger调用API。
我的控制器部分如下:
from bs4 import BeautifulSoup
import requests
def getPages():
x = 0
url = 'https://readheroacademia.net/manga/boku-no-hero-academia-chapter-137/'
req = requests.get(url)
webpage = req.content
soup = BeautifulSoup(webpage, 'html.parser')
pages = soup.findAll('div', attrs={'class': 'acp_content'})
for p in pages:
y = p.findAll('img')
print(y)
getPages()
非常感谢您的帮助。
谢谢。 PG