#NEWLINE# def change_linkedin_query( uri , headers , body ) : #NEWLINE# #INDENT# auth = headers . pop ( 'Authorization' ) #NEWLINE# headers [ 'x-li-format' ] = 'json' #NEWLINE# if auth : #NEWLINE# #INDENT# auth = auth . replace ( 'Bearer' , '' ) . strip ( ) #NEWLINE# if ( '?' in uri ) : #NEWLINE# #INDENT# uri += ( '&oauth2_access_token=' + auth ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# uri += ( '?oauth2_access_token=' + auth ) #NEWLINE# #UNINDENT# #UNINDENT# return ( uri , headers , body )