6 Replies Latest reply on Mar 24, 2017 6:18 AM by luanaf

    GET request

    luanaf

      Hello,
      I created a script using filemaker Base Element to create integration between filemkaerand Brandboom.

      In the script I created the various APIs to access elements.
      I used Base Element and I declared my variable (Public Key, privatekey, timestamp, signature).
      I then created my URL.
      I valued header to get a response in JSON.
      I performed the API, the results obtained, did the parse and everything worked.

      I closed the script, now I have opened and running it instead of my results I get:

      <Html>
      <Head> <title> 301 Moved Permanently </ title> </ head>
      <Body bgcolor = "white">
      <Center> <h1> 301 Moved Permanently </ h1> </ center>
      <Hr> <center> nginx / 1.10.0 (Ubuntu) </ center>
      </ Body>
      </ Html>

      If I take the URL and put it on the browser or I run it from terminal (with curl) I get the JSON.
      I can not understand what has changed and what to change.

      Thank's.

        • 1. Re: GET request
          Jason Wood

          When you put the url into a web browser, the browser responds to the 301 redirect header by requesting the new URL (which is also specified in the header).

           

          I'm not sure why it worked the first time only but 301 is often used to redirect from http to https... so maybe you just need to make that change to your url? Or maybe they really have changed the URL of the resource... check if the URL changes in the browser location bar.

          • 2. Re: GET request
            luanaf

            Hello,
            the browser URL changes from HTTP to HTTPS.
            The browser is properly redirect while fileMaker not.
            But if I ask to perform the get put directly HTTPS does not return me any results.

            • 3. Re: GET request
              user19752

              Did you try "CURLOPT_FOLLOWLOCATION" option ?

              BE_Curl_Set_Option – BaseElements Plugin Help Centre

              • 4. Re: GET request
                luanaf

                Hi,
                I tried. I set a catch mistakes too.
                Now 301 but no longer returns this error:

                 

                CURLE_SSL_CONNECT_ERROR (35)

                A problem occurred somewhere in the SSL/TLS handshake. You really want the error buffer and read the message there as it pinpoints the problem slightly more. Could be certificates (file formats, paths, permissions), passwords, and others.

                 

                is there anything I can do?

                • 5. Re: GET request
                  wimdecorte

                  luanaf wrote:

                   

                  But if I ask to perform the get put directly HTTPS does not return me any results.

                   

                  You should be getting some response, what is it?

                  • 6. Re: GET request
                    luanaf

                    I solved.
                    The problem was related to Brandboom software with which I am trying to communicate. Through filemaker (Basic Element) was using TLS 1 while he expected TLS 1.2.
                    Updating BaseElement now requests are 1.2 and the system works.

                     

                    Thank you all.