Jump to content
Sign in to follow this  
jugador

Curl from Command Line

Recommended Posts

ok

Run(@ComSpec & '/c curl.exe --header access_token:****** "https://abc.com/......" -o output.json', "", @SW_HIDE)

but this not working as I unable to input $TokenID to access_token:

Local $TokenID = ******
Run(@ComSpec & '/c curl.exe --header access_token:' & $TokenID & ' ' & "https://abc.com/......" & ' ' &'-o output.json', "", @SW_HIDE)

 

Edited by jugador

Share this post


Link to post
Share on other sites

do double quotes around the token make it better or worse?  

Run(@ComSpec & '/c curl.exe --header access_token:"' & $TokenID & '" ' & "https://abc.com/......" & ' ' &'-o output.json', "", @SW_HIDE)

'unable' could mean lots of things, so if you could show the errors or clarify that would probably make for better guesses.


,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-.
|(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/
(_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_)
| | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) (
| | | | |)| | \ / | | | | | |)| | `--. | |) \ | |
`-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_|
'-' '-' (__) (__) (_) (__)

Share this post


Link to post
Share on other sites
10 hours ago, jugador said:

What about the quotation marks around the http address from the first post?


Local $TokenID = ******
Run(@ComSpec & '/c curl.exe --header access_token:' & $TokenID & ' "https://abc.com/......" -o output.json', "", @SW_HIDE)

 

 

 

Share this post


Link to post
Share on other sites

@Sidley

If https not double quote it’s not working from my side.

@iamtheky

Sorry my fault, rest of the code working except -o output.json not happening.
Anyway if put https & json output under single quote its work.

Run(@ComSpec & '/c curl.exe --header access_token:' & $TokenID & " " & '"https://abc.com/......" -o output.json', "", @SW_HIDE)

 

Edited by jugador

Share this post


Link to post
Share on other sites
11 minutes ago, jugador said:

@Sidley

If https not double quote it’s not working from my side.

your last posted run() command gives the exact same result as the one posted by @Sidley. ;)
Why have the confusing " " &  to add an space? Just keep it simple and readable:

Run(@ComSpec & '/c curl.exe --header access_token:' & $TokenID & ' "https://abc.com/......" -o output.json', "", @SW_HIDE)

Jos


SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
56 minutes ago, jugador said:

btw how to tag '@ + name' not doing the job.

Yea, you need to select from the dropdownbox with names when typing @jugador, just typing the @name doesn't work in this forum.

Jos


SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...