0

I want to perform request via AsyncClient using httpx but URL Contains "_" Underscore and it cannot be parsed.

async with self.checkoutSession:

                    sendCheckoutResp = await self.checkoutSession.post(
                        "https://api.exmaple.com/api/_action/someAction",
                        headers=self.mainHeaders,
                        cookies=self.refreshToken
                    )

Code is giving me traceback: Unsupported URL protocol 'example'

Is it somehow possible to send request to url that looks like that?

  • You don't have an _ in the domain of your example. There are some typos in your question. Did you make a typo in the original domain? I tested with `https://en.wikipedia.org/wiki/Main_Page` and no problem so underscores, where generally permitted, do not seem to be a problem in terms of getting a response. We will ignore SEO etc. – QHarr Jul 13 '21 at 03:34
  • I just found out that there were error, thats a mobile api and it redirected me to the site with example:// endpoint – chimeczekkosmo Jul 13 '21 at 10:27

0 Answers0