Coder Social home page Coder Social logo

httpclient's People

Contributors

hightman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

httpclient's Issues

Saved cookies not working

On some sites working and some are not. On fiverr after register cookies not working but working if i use php curl cookies.

All cookies not colleting and saving. Curl collecting all cookies and working in curl. I compared both cookies and saw that 2-3 line is missing.

How will i get all cookies like curl cookie and can make it workable?

Its your code cookies (old):

Array
(
    [www.fiverr.com] => Array
        (
            [/] => Array
                (
                    [_pxhd] => Array
                        (
                            [value] => Ahb8ItRUidqb/iRZWGBcZPXz14hVaU8STkWHBGs/W9Z6BdlNNyLEa8hTVx6pdtUBOYBrmb6ZBvaxk7dPWQyKXw==:KpQdKL-X6KkpEBTK96lun-mUaWVTiWJWSfgVdOyzNL4kbrdinSWlhVIy5Br9ZlLLws09Chw-RTnjuxQQbGsiq5UDlj4acEj/deSs1Hp172w=
                            [expires] => 1666787155
                        )

                    [_fiverr_session_key] => Array
                        (
                            [value] => 1cb52c60cbb10c753b8dce7c9cbf13e1
                            [expires] => 1635855956
                        )

                    [first_page_after_registration] => Array
                        (
                            [value] => true
                            [expires] => 1635251216
                        )

                )

        )

    [fiverr.com] => Array
        (
            [/] => Array
                (
                    [u_guid] => Array
                        (
                            [value] => 1635251151766-1f0d7b5c-6f62-4e83-a7ae-5ee5c2bf21eb
                            [expires] => 1666787151
                        )

                    [logged_out_currency] => Array
                        (
                            [value] => BRL
                            [expires] => 
                        )

                    [page_views] => Array
                        (
                            [value] => 1
                            [expires] => 1637929551
                        )

                    [visited_fiverr] => Array
                        (
                            [value] => true
                            [expires] => 1635251456
                        )

                    [__cfruid] => Array
                        (
                            [value] => 37b39a7e24b95cf5f880ec0f95aa2d16586ece1f-1635251151
                            [expires] => 
                        )

                    [hodor_creds] => Array
                        (
                            [value] => eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE2NjY3ODcxNTYsImlzcyI6ImZpdmVyci9ob2Rvci92MiIsInVpZCI6MTE2MTExNDI0LCJ1cHMiOiJiMzBjN2RjOTUyMzEwZmY2MmYzZTBlNTdiNjRiNmUxYTcxZTA0ZjhmODMxNDE5OTZlZjgyMDRmNDI1OTBlN2FjZWJjYjFiMzU3MTFkNzVkOTc1Njc4ZTE4MjRjMGE2MjAzNGM3ZGZiMzlmMmE3ZDFhODdhNWQwYWVmNWM1NjNmNiIsImlhdCI6MTYzNTI1MTE1Niwic2lkIjoiODZjYzM5YzY5ZjY0ZWNjMWU0YjA3M2I4NWMzNTg0YWEifQ.6rySv5UjIlz1Q_ZNtcC_MDzwESBX7LwOIIOrWZIV0Hk
                            [expires] => 1666787156
                        )

                    [logged_in_currency_v2] => Array
                        (
                            [value] => BRL
                            [expires] => 
                        )

                    [session_locale] => Array
                        (
                            [value] => en
                            [expires] => 
                        )

                )

        )

)

New cookies:

a:2:{s:14:"www.fiverr.com";a:1:{s:1:"/";a:3:{s:5:"_pxhd";a:2:{s:5:"value";s:197:"XyN1YKg1D9me3h6NXDCjEFwo5j3z4i0y-FYZ7xJSGcZ0QNl2O-xTB/Q1/v3-vBdauIb6vr3kNT3KazmqghPjOQ==:uvOciLgcSlruoN0hflyrXbhGqokt4VlWNwq2MYTDWbL1JBSvOyl7HxrJZ3CeXmdVNwTX7xqC955N/s4UFq/8khDVjHXJuOwOtzJBybpUAvI=";s:7:"expires";i:1666788788;}s:19:"_fiverr_session_key";a:2:{s:5:"value";s:32:"a6120cc3b597467eb6693e216cb2cc11";s:7:"expires";i:1635857588;}s:29:"first_page_after_registration";a:2:{s:5:"value";s:4:"true";s:7:"expires";i:1635252848;}}}s:10:"fiverr.com";a:1:{s:1:"/";a:8:{s:6:"u_guid";a:2:{s:5:"value";s:50:"1635252785181-d629b602-ed9b-4f20-b954-093cc72d6560";s:7:"expires";i:1666788785;}s:19:"logged_out_currency";a:2:{s:5:"value";s:3:"INR";s:7:"expires";N;}s:10:"page_views";a:2:{s:5:"value";s:1:"1";s:7:"expires";i:1637931185;}s:14:"visited_fiverr";a:2:{s:5:"value";s:4:"true";s:7:"expires";i:1635253088;}s:8:"__cfruid";a:2:{s:5:"value";s:51:"8bd2134a07ca955b5902c942a693f55de20612f2-1635252788";s:7:"expires";N;}s:11:"hodor_creds";a:2:{s:5:"value";s:419:"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE2NjY3ODg3ODgsImlzcyI6ImZpdmVyci9ob2Rvci92MiIsInVpZCI6MTE2MTEyNTM3LCJ1cHMiOiJkMzY1ZTNhMDU2ZjljZDQwZmJlOWZmZTUzNTM3MmFmNDc3MmRhZmNiMjliYmE4MDQyZDZmMmIyZWMzNDhhYzY4YzBhMWMyNWE3Y2NlYjEzZTJmNTY4YWNmMjhiZTY2M2UzNDYyMDZhOWVkN2QyYTIyOTFjZWM2NDk5NzM2MjU5NCIsImlhdCI6MTYzNTI1Mjc4OCwic2lkIjoiMTM1MmQ1ZmE0NGMwYmVlYjAyZWZkMTljOGJmMjY0Y2YifQ.FIO6lcwTAMW-7XsbAYg2qfoPBY1xuozTGMSo2-vu8OY";s:7:"expires";i:1666788788;}s:21:"logged_in_currency_v2";a:2:{s:5:"value";s:3:"INR";s:7:"expires";N;}s:14:"session_locale";a:2:{s:5:"value";s:2:"en";s:7:"expires";N;}}}}

Its curl cookies (many old):

# Netscape HTTP Cookie File
# https://curl.se/docs/http-cookies.html
# This file was generated by libcurl! Edit at your own risk.

.fiverr.com	TRUE	/	FALSE	0	logged_in_currency_v2	USD
#HttpOnly_www.fiverr.com	FALSE	/	FALSE	1631124613	_fiverr_session_key	f5584ad8475b9b8ba61c1f241cccefcc
.fiverr.com	TRUE	/	FALSE	1630520112	visited_fiverr	true
.fiverr.com	TRUE	/	FALSE	0	session_referer	https%3A%2F%2Fm.facebook.com%2F
#HttpOnly_.fiverr.com	TRUE	/	FALSE	1662055811	hodor_creds	eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE2NjIwNTU4MTEsImlzcyI6ImZpdmVyci9ob2Rvci92MiIsInVpZCI6MTEzMzM0MjUyLCJ1cHMiOiI3MTEzZGI0OTM5M2FkODIxYjQ5OWVmZDQyOGRiNDY2ZDYzMGZiYTI1NTQwOTkxNjU5ODBmZDc0ZTZhYWFkMzdiNDY4MGNmOWVhOTNmMjgyNDI3ZDUzYTg3ZWQyNDIyZTViMTQxODY2YTIyNWE0YTdmZTY2YzZmYjYxZTAxNjI0YSIsImlhdCI6MTYzMDUxOTgxMSwic2lkIjoiYTU0NmRiZTk4MWQ4NDAyYjQyZDhhYjllODgwNTc2N2EifQ.bAPsk555Ccz8NY4nfL_LsN5BMJPzgGmBfQjb8eHhMNQ
.fiverr.com	TRUE	/	FALSE	0	logged_out_currency	USD
.fiverr.com	TRUE	/	FALSE	0	guid_ext	1630519811
.fiverr.com	TRUE	/	FALSE	1662055811	u_guid	1630519811911-e5f9a243-da4f-47bb-b9c8-c36473324240
www.fiverr.com	FALSE	/	FALSE	1662055812	_pxhd	CKsq5ulKU9OZU7sVGLQcfGwO6RKj5EPZRIJPVtitDBhltWvva/yhs7XZqyWHLZ3QvJRZ2WxAf7S/cdZoZ73G3A==:j6ydz-nEg--l730vgeiQZYQ8b1W1SO0h39jYhuj9OuLYm9d3fJtlm8SSrugZx3UWtcm2o6WrrqLoyrG5ZXPWxroZ20akHL2UGB6QJfus2kw=
#HttpOnly_.fiverr.com	TRUE	/	FALSE	0	__cfruid	eb5dc176a7654c59d39e2de1902ef3607e9c77f4-1630519809

All cookies value are different, just posted for your understand. Check key params.

Missing:

.fiverr.com
TRUE	/	FALSE
#HttpOnly_www.fiverr.com
#HttpOnly_.fiverr.com

session_referer
guid_ext

Cookies not working in post method

Remote login in website and saved cookies. After that saved cookies not working in post method. But working in get method. After logged in i have to send post request in same website another url.

May be your post request $http->post() code have not cookies codes. I am getting 403 forbidden error.

https url not working

http tcp url working but https ssl url not working in xampp. May be have to add cer/pem certificate in your code. How to generate and add certificate in your code?

400- Bad Request - Reset by Peer

HI,
We get the below Response, How can solve it, Is any configuration changes required?

[status] => 400
[statusText] => Bad Request
[error] => Reset by peer

Multi form-data issues

This data how to send?

$BODY .= '------WebKitFormBoundary'.$BOUNDARY.$eol;
$BODY .= 'Content-Disposition: form-data; name="file"; filename="'.basename($cp).'"'.$eol;
$BODY .= 'Content-Type: image/'.pathinfo(basename($cp), PATHINFO_EXTENSION).$eol.$eol;
$BODY .= $Pic.$eol; 

Trying like this:

$request->addPostFile('file', $cp, basename($cp));
$request->addPostField('Content-Type', 'image/'.pathinfo(basename($cp), PATHINFO_EXTENSION));

Name field: file
Filename: how to add?
2nd Line Content-Type: How to add?
$Pic: image how to add?

setJsonBody() multiple array issues

Its PATCH request.

This is my json post data

{"user": {"profile_attributes": {"one_liner": "'.$title.'"}}}

i am trying like this but not working:

$request->setJsonBody(["user" => ["profile_attributes" => ["one_liner" => $title]]]);

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.