- 
          
 - 
                Notifications
    
You must be signed in to change notification settings  - Fork 34
 
XML body requests #85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review by Korbit AI
Korbit automatically attempts to detect when you fix issues in new commits.
| Category | Issue | Status | 
|---|---|---|
| Uncaught XML Parsing Errors ▹ view | ✅ Fix detected | |
| XML Validation Result Not Used ▹ view | ✅ Fix detected | |
| Content type handling not extensible ▹ view | ✅ Fix detected | 
Files scanned
| File Path | Reviewed | 
|---|---|
| src/AbstractRequester.php | ✅ | 
Explore our documentation to understand the languages and file types we support and the files we ignore.
Check out our docs on how you can make Korbit work best for you and your team.
        
          
                src/AbstractRequester.php
              
                Outdated
          
        
      | $bodyRequestDef = $this->schema->getRequestParameters($this->psr7Request->getUri()->getPath(), $this->psr7Request->getMethod()); | ||
| $bodyRequestDef->match($requestBody); | ||
| } | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| $bodyRequestDef = $this->schema->getRequestParameters($this->psr7Request->getUri()->getPath(), $this->psr7Request->getMethod()); | |
| $bodyRequestDef->match($requestBody); | |
| } | |
| // Check if the body is the expected before request | |
| $bodyRequestDef = $this->schema->getRequestParameters($this->psr7Request->getUri()->getPath(), $this->psr7Request->getMethod()); | |
| $bodyRequestDef->match($requestBody); | 
Description by Korbit AI
What change is being made?
Add support for XML body requests in the
AbstractRequesterby integrating thebyjg/xmlutillibrary, updating content type parsing logic, and introducing a test case for handling XML request bodies.Why are these changes being made?
These changes are being made to enhance the request handling capabilities of the
AbstractRequesterby supporting XML payloads, which expands the versatility of the application in processing different content types beyond JSON. This approach utilizes the dependencybyjg/xmlutilto parse and manage XML content efficiently without disrupting existing functionality for JSON and multipart form data.