Guzzle Questions & Answers - User Journey - How you do things

44 visualizzazioni
Passa al primo messaggio da leggere

Antony Lawlor

da leggere,
22 giu 2015, 18:10:2822/06/15
a guz...@googlegroups.com
I have been learning about Guzzle over the past 6 months or so now, but i am struggling to understand and achieve some things, and i guess i need some basic questions answered first before i can proceed with a clear head.


1. When on a site, and there is a form, and that form posts, if i re-create that post using guzzle, and receive a 200 response, there is no if's or buts, that post has went through successfully? right?

2. Often times, when I try to re-create user journeys i simply cant. It could be down to a lack of knowledge of sites communicate information with clients. For an example I am going to use linkedin, i could use any site but this is the one I have open in my tab. When i go to a site i want to re-create a user journey for, i fire up, bring up the network tab in developer tools and browse. I watch the network traffic and re-create the gets and posts i need to get to the end point. Basic sites are fine, but sites that use ajax and javascript!! man i am confused as hell! so back on point, linkedin.

I will just be using logging in as an example. I fire up chrome, make sure the network tab is visible and fill out my details and hit login, this is what i see.

isJsEnabled:true
source_app:
tryCount:
clickedSuggestion:false
session_password:mypassword
signin:Sign In
session_redirect:
trk:hb_signin
loginCsrfParam:efxxxx4b-b4xx-4xx2-xxxx-e2xxxa0xxx88
fromEmail:
csrfToken:ajax:8x62928886731435541
sourceAlias:0_7r5yezXXXiA_xxxxD8sf6DhOjXXXXps5xGxxxxxEEoi
client_ts:14xxxx033xx31
client_r:myusername@name.com:673xxxxx8:305xxxxxx:30xxx5678
client_output:-56288994
client_n:673016868:305xxx293:30xxx5678
client_v:1.0.1

So at this point i'm like, right, username and password easy i know them. Some booleans, cool can set them! hmmmm what are all these random client and token fields!!! usually, if there are not to many random fields, and if i am lucky, i go onto the page that the form was on (in this case the linkedin login page) and try and find these unique value (i view the page src before posting so i can look back).

This is just my way of doing things, im still very much learning and would like to see or here what advice you guys could give me, tips tricks, easier ways to re-create complicated posts, i've heard people mention phantomjs and oauth but have no clue how they work in relation to guzzle.

So yea, sorry if that was a bit long just trying to get everything out of my head and onto paper to so if i am taking a long way for a shortcut and if there are faster ways to do things / things i should start looking into, examples are handy, i like to draw a picture in my head.


-Anton.
Rispondi a tutti
Rispondi all'autore
Inoltra
0 nuovi messaggi