Announcement

Collapse
No announcement yet.

Mvt:Call headers section

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Mvt:Call headers section

    I'm making a page template mvt:call to the UPS api.
    Given the code below. What goes in headers="???????"

    The API specs say
    Use HTTP/s POST.
    The JSON API expects the following HTTP headers:
    Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept
    Access-Control-Allow-Methods: POST
    Access-Control-Allow-Origin: *
    Content-Type: application/json


    Code:
    <mvt:call action = "g.url"
            method = "POST"
            content-type = "'application/json'"
            headers = "??????">
        <mvt:assign name="g.return" value="g.return $  s.callvalue" />
    </mvt:call>
    Ray Yates
    "If I have seen further, it is by standing on the shoulders of giants."
    --- Sir Isaac Newton

    #2
    I would say:
    Code:
    <MvAssign name="l.crlf" value="{  asciichar(13) $ asciichar(10) }">
    (
    Code:
    HEADERS="{ 'Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept' $ l.crlf $ 'Access-Control-Allow-Methods: POST' $ l.crlf $ 'Access-Control-Allow-Origin: *' $ l.crlf }" CONTENT-TYPE="application/json"
    William Gilligan - Orange Marmalade, Inc.
    www.OrangeMarmaladeinc.com

    Comment


      #3
      Thank you sir!
      Ray Yates
      "If I have seen further, it is by standing on the shoulders of giants."
      --- Sir Isaac Newton

      Comment

      Working...
      X