crawl4ai
crawl4ai copied to clipboard
[Bug]: How should crawl4ai initiate a POST request?
crawl4ai version
0.6.3
Expected Behavior
I made the following code settings to implement a POST request for crawl4ai. However, the backend server doesn't receive any values submitted via the POST. How should crawl4ai initiate a POST request?
base_browser = BrowserConfig( browser_type="chromium", headless=True, headers={ "Content-Type": "application/x-www-form-urlencoded" }, ) async with AsyncWebCrawler(config=base_browser) as crawler: run_config1 = CrawlerRunConfig( page_timeout=5000, excluded_tags=["script", "style"], verbose=False, cache_mode=CacheMode.BYPASS, ) form_data = "m=numb&dity=01" # Corrected quotes to standard English quotes wait crawler.arun( url="http://127.0.0.1:8080/index", config=run_config1, method="POST", data=form_data, )
Current Behavior
How should crawl4ai initiate a POST request?
Is this reproducible?
Yes
Inputs Causing the Bug
Steps to Reproduce
Code snippets
OS
window
Python version
3.11.1
Browser
No response
Browser version
No response
Error logs & Screenshots (if applicable)
No response