• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: do shell script curl where url must contain double quotes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: do shell script curl where url must contain double quotes


  • Subject: Re: do shell script curl where url must contain double quotes
  • From: Walter Ian Kaye <email@hidden>
  • Date: Tue, 30 Mar 2004 15:46:31 -0800

At 03:17p -0700 03/30/2004, Gnarlodious didst inscribe upon an electronic papyrus:

>Entity Jeffrey H. Dean spoke thus:
>
> > Is it possible to use curl --url with a url that must contain double
> > quotes? Escaping the quotes as below gives a parameter error from the
> > server. I have also tried other types of quotes without success.
> >
> > Thanks,
> > Jeff
> >
> > set theSource to do shell script "curl --url
> > 'testing.shippingapis.com/ShippingAPITest.dll?API=TrackV2&XML=
> > <TrackFieldRequest USERID=\"1111\" PASSWORD=\"2222\"> <TrackID
> > ID=\"EO001607035US\"/> </TrackFieldRequest>'"
>
>Try replacing them with &quot; (you might need to escape the & character)

&quot; is an HTML entity and is only for use inside HTML pages -- nowhere else.
What you want is URL encoding -- and for the spaces as well:

set theSource to do shell script "curl --url 'testing.shippingapis.com/ShippingAPITest.dll?API=TrackV2&XML=<TrackFieldRequest USERID="1111" PASSWORD="2222"><TrackID ID="EO001607035US"/></TrackFieldRequest>'"

You might need to encode the equal signs inside the XML as = also, depending on how that DLL does its parsing of the URL.


-W
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: do shell script curl where url must contain double quotes
      • From: Gnarlodious <email@hidden>
References: 
 >Re: do shell script curl where url must contain double quotes (From: Gnarlodious <email@hidden>)

  • Prev by Date: Re: AppleScript & HTML Again...
  • Next by Date: Converting unix styled path (string) to Mac path?
  • Previous by thread: Re: do shell script curl where url must contain double quotes
  • Next by thread: Re: do shell script curl where url must contain double quotes
  • Index(es):
    • Date
    • Thread