Hoppa till huvudinnehållet

Help on Web Request Actiity

Kommentarer

6 kommentarer

  • Ryan Cooney

    Hi Andrea,

     

    This attached workflow. It does a Web Request with a custom header.

     

    --Ryan

    0
  • Ryan Cooney

    I've also just added a few workflows like this to the File > New menu:

    • Send Web Request GET Custom Headers
    • Send Web Request POST Form
    • Send Web Request POST JSON
    • Send Web Request POST XML

     

    --Ryan

    0
  • Permanently deleted user

    webrequestThank's Ryan, unfortunately I'm looking for server side activity (xaml files).

    I'm using Workflow Designer. I didn't understand how to create variable it needs.

    Any suggestions?

     

    Regards,

    Andrea

     

     

    0
  • Ryan Cooney

    Ahh. It is definitely more involved in Xaml workflows. You have to:

    1. Create the WebHeaderCollection with an Assign activity
    2. Then use the Invoke activity to call the "Add" method on the WebHeaderCollection and pass it the name and value of the header.
    3. Then repeat for each header you want to add.

     

    I've attached an equivalent Xaml workflow. Hope that helps.

     

    --Ryan

    0
  • Permanently deleted user

    Ryan, It works fine. I was very close but without documentation is very hard to find the right solution.

    Thank you so much, I was very helpfull.

     

    Regards,

    Andrea

     

     

    0
  • Berend Veldkamp

    If, like me, you find the Invoke activity a bit too cumbersome, you can use this directly in the Headers property of the Web Request activity:

     

    New WebHeaderCollection() From { "Content-Type:text/plain", "Accept:text/plain", "HeaderName:HeaderValue", ... }

     

     

     

    0

Du måste logga in om du vill lämna en kommentar.