WordPress / WordPress/Requests
[Question] How to get the data about the request that gets sent?
Open
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 3.6k
- Forks
- 500
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 5
Description
$domain_URL = 'http://some.url.com/';
$event_relative_URL = '/relative/path/';
$session = new Requests_Session($domain_URL);
$response = $session->get($event_relative_URL);
$requestURL = '/api?something=here&and=there'
$payload = {[...]} // some data there
And now I need to do
$response = $session->post($requestURL, [], json_encode($payload))
but I'd like to debug how the outgoing request looks like. How to do that?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The report names Requests_Session and the get/post calls but no repository file or test. Start by tracing that session usage and the outgoing-request API; done means documenting how to inspect the fully assembled request, including its URL and payload.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- api
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100