Jump to content

jjw

Members
  • Content Count

    2
  • Joined

  • Last visited

Posts posted by jjw


  1. 9 hours ago, robertjohns said:

    How can I find all instances of a string in a file , replace all instance of the string and save the copy of the file in Delphi

    Will this work?

     

    memo2.Text := StringReplace(memo1.Text, 'TextToRepace', 'ReplaceWith', [rfReplaceAll, rfIgnoreCase]);


  2. Hey

     

    Can someone help me please or point me in the right direction.

    im trying to figure out how i can get the response headers from the TSslHttpRest

     

    here is my scenario:

    I need to get multiple JSON files from a web API

    (Containing 2 parameters and 1 authentication header)

    *sslhttprest.RestParams.AddItem('page_number', inttostr(x));

    *sslhttprest.RestParams.AddItem('page_size', inttostr(y));

    & * sslhttprest.ExtraHeaders.Add('Authorization: xxxx');

     

    Downloading the JSON file to Stream / File works fine.

    but i need the additional response header info, supplied by the 3rd party, as it contains additional basic info that i need to abide by (how many calls per minute i can make vs how many i already did)

     

    is this possible?

     

    Screenshot from Postman' Response below

    image.thumb.png.ae63ad688a0e84e7d24fcddfe501bbc0.png

     

    Thanks in advance

    JJ

×