Populating HTTP Request from TextFields?

  1. last year

    steveharman

    30 Mar 2016 User since 2016
    Edited last year by steveharman

    Hi,

    Could I ask what the flow would be to take input from text fields (say, username & password) and pass them to the request of my HTTPClient?

    I've got my app authenticating with a backend provider (via an HTTPClient / REST request) and data flows into it perfectly via a simple GET against the backend's API, but I'd like to POST username and password values to the backend from two Creo TextFields.

    I can't get my head around how to wire up user input from the TextFIelds to Body parameters of my HTTPClient request.

    Cheers,

    Steve

  2. steveharman

    1 Apr 2016 User since 2016
    Edited last year by steveharman

    Can anybody help me with this please? If I can get this process working I can probably compete 40% of my project which takes user input from fields, buttons etc. passes it to several APIs via the HTTPClient object and then processes responses, but without knowing the answer I'm stuck.

    Today I worked out that I can drag out from my text input fields and create binding objects. The properties of these objects can then be configured to specify their input value (say, text in the case of my TextInput fields) and where their output should go (say, body properties of the HTTPClient Request).

    But I still can't figure out the final step - please see my previous screenshot of the HTTPClient Request Editor: What do I put in the Body > Value fields to populate the HTTP request with values that I configured in my Bindings?

    I'd hoped that the Body > Value fields of the HTTPClient request might have dropdowns where I could select my newly created Bindings, but the Value fields just seem to be free text.

    Thanks,

    Steve

  3. Kwint

    1 Apr 2016 User since 2016
    Edited last year by Kwint

    I've been asking for the same question for a while. I think for now it is not possible.

    My post

  4. steveharman

    2 Apr 2016 User since 2016
    Edited last year by steveharman

    Ah, right - thanks @Kwint

    Really hope this functionality makes it to b5 - it's such a fundamental, taking user inout from a field and passing it to an external back-end (searching databases etc.)

    Thanks again,

    Steve

  5. 6 months ago

    marco

    16 May 2017 Administrator User since 2016

    Hi @steveharman few more days and then we'll release b6 with new documentation and tutorials.
    Thanks a lot for your patience.

or Sign Up to reply!