<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Gratia Gamage on Medium]]></title>
        <description><![CDATA[Stories by Gratia Gamage on Medium]]></description>
        <link>https://medium.com/@gratia12?source=rss-3f9ac404f1aa------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*lFZm3CiXOEVH0lETMoIaXQ.jpeg</url>
            <title>Stories by Gratia Gamage on Medium</title>
            <link>https://medium.com/@gratia12?source=rss-3f9ac404f1aa------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 11:09:46 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@gratia12/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[I can change myself, but I cannot change another adult]]></title>
            <link>https://medium.com/@gratia12/i-can-change-myself-but-i-cannot-change-another-adult-588e020de368?source=rss-3f9ac404f1aa------2</link>
            <guid isPermaLink="false">https://medium.com/p/588e020de368</guid>
            <dc:creator><![CDATA[Gratia Gamage]]></dc:creator>
            <pubDate>Thu, 01 Oct 2026 09:36:29 GMT</pubDate>
            <atom:updated>2026-10-01T10:01:02.557Z</atom:updated>
            <content:encoded><![CDATA[<p>Sometimes I think about what it really means to raise a child in a society where gender, power, respect, and violence are still such complicated issues.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/360/1*focPLKcJaJRkJYVz_Rooqg@2x.jpeg" /></figure><p>If I ever have a daughter, I would want to teach her to be strong-minded, vigilant, independent, and aware of her worth. I would want her to know that being kind does not mean being submissive, and that she never has to make herself smaller to make someone else comfortable.</p><p>If I have a son, I would want to teach him just as much. I would want him to understand that strength does not mean dominance, that respect is not conditional, and that a woman’s voice deserves the same weight as a man’s. I would want him to grow up knowing that equality is not about putting women above men, but about never believing that men are above women.</p><p>But children don’t learn these things only from conversations. They learn from what they see.</p><p>They watch how adults speak to each other, how disagreements are handled, how anger is expressed, whose opinions are respected, who apologises, who takes responsibility, and what happens when someone crosses a boundary.</p><p>That makes me think about how important the environment we create at home really is. We can teach children beautiful ideas, but our everyday behaviour is often the lesson they remember most.</p><p>And perhaps that is one of the hardest parts of becoming a parent: realising that we can work on ourselves, choose our values, and try to give our children the right foundations, but we cannot completely control what another adult brings into the household.</p><p>It makes me wonder whether raising a child is less about creating a perfect world for them and more about creating a home where the values we want them to carry are actually lived.</p><p>A home where love does not require fear, strength does not require control, disagreements do not require cruelty, and respect is something everyone gives and receives.</p><p>I don’t think I have an answer to all of this. I just find myself thinking about what kind of example I would want to set, and what kind of environment I would want my future children to call home.</p><p>And maybe that is something worth thinking about long before becoming a parent.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=588e020de368" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Let’s overthink a little bit]]></title>
            <link>https://medium.com/@gratia12/lets-overthink-a-little-bit-ae076014da2c?source=rss-3f9ac404f1aa------2</link>
            <guid isPermaLink="false">https://medium.com/p/ae076014da2c</guid>
            <dc:creator><![CDATA[Gratia Gamage]]></dc:creator>
            <pubDate>Thu, 01 Oct 2026 09:28:40 GMT</pubDate>
            <atom:updated>2026-10-01T10:01:46.898Z</atom:updated>
            <content:encoded><![CDATA[<p>“I wouldn’t make you my life.”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/554/1*3ZR6roKfa7b30LOwxcAsDg@2x.jpeg" /></figure><p>Or rather, I’m not sure if that’s exactly what he said. Maybe he meant that if he had only one life, he wouldn’t live it for someone else’s sake. Or perhaps he meant that, in this one life, he’ll live in a way that pleases him, not to please anyone else.</p><p>But it also made me think: wouldn’t I change parts of my life for him? Wouldn’t I cook for two people when I could easily have a packet of noodles and tea for dinner? Wouldn’t that be living for him too?</p><p>Wouldn’t I ask whether a dress looks good on me, or whether a particular hair color would suit me in his eyes, when I could simply do whatever I please?</p><p>Wouldn’t that be living a little bit for him too?</p><p>When I think twice before going on a solo trip, or spend a little more than I’m supposed to because I’m wondering whether it might become a problem for our little family, isn’t that also a form of considering him?</p><p>Aren’t we living for each other after all?</p><p>Had me thinking a little bit.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ae076014da2c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Audience Effect]]></title>
            <link>https://medium.com/@gratia12/the-audience-effect-1d9fcca5d02b?source=rss-3f9ac404f1aa------2</link>
            <guid isPermaLink="false">https://medium.com/p/1d9fcca5d02b</guid>
            <dc:creator><![CDATA[Gratia Gamage]]></dc:creator>
            <pubDate>Thu, 01 Oct 2026 09:15:13 GMT</pubDate>
            <atom:updated>2026-10-01T10:01:35.631Z</atom:updated>
            <content:encoded><![CDATA[<p>I’ve been thinking about how differently people can behave depending on who is watching.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/310/1*4_faHNt3c4RUtfLrwVCyDw@2x.jpeg" /></figure><p>Someone will carry every bag for their in-laws, rush to help their partner’s family, and make sure everyone sees how considerate they are. Meanwhile, their own mother walks behind them carrying two bags in her hands and another on her shoulder.</p><p>Someone will speak gently, patiently and respectfully to a person they want to impress, but speak harshly to the person who has loved them long enough to be taken for granted.</p><p>Someone will hold the door open for a stranger, offer their seat to someone they barely know, and go out of their way to help a colleague, yet somehow have no patience left for the person waiting for them at home.</p><p>Someone will listen attentively when a person with status is speaking, nodding at every word, carefully choosing their response. But when someone they consider less important speaks, they interrupt, dismiss, mock, or barely listen.</p><p>Someone will be incredibly generous when generosity can be seen, but suddenly have very little to give when there is no audience to witness it.</p><p>Someone will apologise quickly when their mistake affects their reputation, but struggle to apologise to the person they actually hurt.</p><p>And someone will be the most charming version of themselves around people whose approval they want, while giving the people closest to them the version that requires the least effort.</p><p>Why?</p><p>Why does kindness sometimes need an audience?</p><p>Why does respect become conditional?</p><p>Why do patience, gentleness, generosity and good manners seem to disappear when there is nothing to gain from displaying them?</p><p>Maybe because being seen as a good person is sometimes easier than actually being one.</p><p>But character is not just how we behave when the right people are watching.</p><p>It is how we behave when nobody is impressed.</p><p>It is how we speak to the person who cannot do anything for us.</p><p>It is how we treat the parent who will forgive us anyway.</p><p>It is how we treat the partner who has already seen every version of us.</p><p>It is how we respond when we are angry, tired, inconvenienced, or certain that we will never be held accountable for our behaviour.</p><p>And perhaps the most uncomfortable question isn’t “Why do other people do this?”</p><p>It is:</p><p><strong>“Do I do it too?”</strong></p><p>Because if I am capable of noticing this behaviour in others, I have to be willing to notice it in myself.</p><p>Maybe someone has watched me being kinder to a stranger than I was to someone I love.</p><p>Maybe I have been more patient with someone whose approval I wanted than with someone whose love I already had.</p><p>Maybe I have performed goodness in places where it could be noticed and forgotten it in places where it could not.</p><p>I would rather catch myself doing that than become comfortable with it.</p><p>Because the standard I use to judge someone else’s character should be a standard I am willing to hold myself to.</p><p><strong>If my kindness changes depending on who is watching, perhaps it isn’t kindness yet.</strong></p><p>Maybe the real test of character is not who we become in front of important people.</p><p>Maybe it is who we remain when there is absolutely no audience at all.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1d9fcca5d02b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Woman]]></title>
            <link>https://medium.com/@gratia12/a-woman-c7bec03447c6?source=rss-3f9ac404f1aa------2</link>
            <guid isPermaLink="false">https://medium.com/p/c7bec03447c6</guid>
            <dc:creator><![CDATA[Gratia Gamage]]></dc:creator>
            <pubDate>Sun, 24 Sep 2023 12:05:26 GMT</pubDate>
            <atom:updated>2026-10-01T10:01:21.519Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/736/1*GPUNuDjFRMJRdRqlSursoA.jpeg" /></figure><p>She’s more than just a daughter to her family; she’s the embodiment of hope and joy, wrapped in the delicate hues of pink that greeted her arrival. To her father, she’s his little princess, and to her mother, she’s an irreplaceable gem. Tender is the word that best describes this girl, nurtured within the loving sanctuary her parents created. She confides in them, sharing every experience life throws her way.</p><p>As she blossoms into her teenage years, the rules that once bound her begin to feel like restraints. She yearns for freedom, trading secrets with her inner circle of friends but concealing them from her parents. She takes her first steps towards independence, believing it’s the right path, yet deep down, she remains daddy’s little princess and mummy’s gem.</p><p>As she catches the eye of admirers and boys vie for her attention, she becomes a captivating figure, akin to a top model on display. She’s caught in the spotlight, experimenting with new relationships, oblivious to the consequences. She surrenders herself, believing she’s found someone who holds the answers to her life, a godsend.</p><p>But as time passes, things change. Troubles emerge, tears well up, and nights become sleepless. She’s torn between keeping her turmoil hidden and sharing it with someone new. She opens up to another boy, hoping to escape her troubles and continue this journey with her newfound confidant, yet this time with a different lead actor.</p><p>Initially, everything seems smooth, but history repeats itself. To her parents, she’s still their precious little princess, their cherished gem. The sad reality is that her newfound life blinds her to the wisdom her parents possess, and the solutions they hold for her chaos.</p><p>Eventually, she stops searching, stops experimenting, and chooses to stay with one person, convinced that this is the one who will bring an end to her tumultuous journey. She has a man now, and like any other relationship, it has its share of challenges. Whenever he pushes her away, she pleads and compromises, fearing loneliness in a world where she swore this would be her last attempt. She bears the tears and the pain in her heart, determined to make it work.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c7bec03447c6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mastering Filter and Access Predicates for Optimal Data Retrieval]]></title>
            <link>https://medium.com/@gratia12/mastering-filter-and-access-predicates-for-optimal-data-retrieval-881c87399723?source=rss-3f9ac404f1aa------2</link>
            <guid isPermaLink="false">https://medium.com/p/881c87399723</guid>
            <dc:creator><![CDATA[Gratia Gamage]]></dc:creator>
            <pubDate>Sun, 24 Sep 2023 11:47:56 GMT</pubDate>
            <atom:updated>2023-10-13T16:11:49.553Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/290/1*f_m_UcdpqLesGVCfwZrL2A.png" /></figure><p><strong>INTRODUCTION</strong></p><p>This story will cover <strong>Filter </strong>and <strong>Access Predicates</strong> in SQL for optimal data retrieval. These features are essential for querying large databases with millions of rows. By mastering these techniques, you can significantly improve query performance and reduce the time it takes to retrieve data.</p><p><strong>WHAT ARE FILTER PREDICATES?</strong></p><p><strong>Filter predicates</strong> are conditions that are applied to the rows of a table to filter out unwanted data. These are specified in the WHERE clause of a SQL statement. Using filter predicates can reduce the amount of data that needs to be scanned by the query engine, leading to faster query times.</p><p><strong>TYPES OF FILTER PREDICATES</strong></p><p>There are many types of filter predicates, including <strong>comparison operators</strong> (e.g. =, &lt;, &gt;), <strong>logical operators</strong> (e.g. AND, OR), and <strong>wildcard operators</strong> (e.g. LIKE). Knowing when to use each predicate type is essential for optimal query performance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*OHmft6BdO4pmxvea" /><figcaption>Photo by <a href="https://unsplash.com/@markuswinkler?utm_source=medium&amp;utm_medium=referral">Markus Winkler</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p><strong>Equality Predicate</strong>: This type of predicate filters elements or records that are equal to a specified value. For example, in SQL, you can use the “=” operator for equality predicates.</p><p>SELECT * FROM employees WHERE department = ‘HR’;</p><p><strong>Inequality Predicate</strong>: Inequality predicates filter elements or records that do not match a specified value. This includes greater than (&gt;), less than (&lt;), greater than or equal to (&gt;=), and less than or equal to (&lt;=) comparisons.</p><p>SELECT * FROM products WHERE price &gt; 50;</p><p><strong>Logical Predicate</strong>: Logical predicates combine multiple conditions using logical operators like AND, OR, and NOT.</p><p>SELECT * FROM orders WHERE total_amount &gt; 1000 AND status = ‘Shipped’;</p><p><strong>Pattern Matching Predicate</strong>: SQL provides pattern-matching predicates using the LIKE operator. You can use wildcard characters (%) to filter rows based on patterns within text columns.</p><p>SELECT * FROM books WHERE title LIKE ‘%Python%’;</p><p><strong>Membership Predicate</strong>: The IN predicate is used to filter rows where a column&#39;s value matches any value in a specified list.</p><p>SELECT * FROM students WHERE grade IN (‘A’, ‘B’);</p><p><strong>Existential Predicate</strong>: SQL allows you to check for the existence of rows in a subquery using EXISTS and NOT EXISTS.</p><p>SELECT * FROM customers WHERE EXISTS (SELECT * FROM orders WHERE customers.customer_id = orders.customer_id);</p><p><strong>Null Predicate</strong>: You can use the IS NULL and IS NOT NULL predicates to filter rows based on whether a column contains a null value or not.</p><p>SELECT * FROM employees WHERE manager_id IS NULL;</p><p><strong>Between Predicate</strong>: The BETWEEN predicate is used to filter rows where a column&#39;s value falls within a specified range.</p><p>SELECT * FROM products WHERE price BETWEEN 10 AND 50;</p><p><strong>Custom User-Defined Predicate</strong>: SQL allows you to create custom filter predicates using user-defined functions or procedures to filter rows based on complex logic.</p><p>These are some of the common filter predicates in SQL, and you can combine them to create more complex filtering conditions as needed for your specific queries.</p><p><strong>WHAT ARE ACCESS PREDICATES?</strong></p><p><strong>Access predicates</strong> are conditions that filter rows at the time of data access, rather than after the data has already been retrieved. By applying these conditions early in the query process, the query engine can avoid accessing unnecessary data, leading to faster query times.</p><p><strong>TYPES OF ACCESS PREDICATES</strong></p><p>There are many types of access predicates, including <strong>range predicates</strong> (e.g. BETWEEN, &lt;&gt;, &gt;=), <strong>equality predicates</strong> (e.g. =), and <strong>join predicates</strong> (e.g. INNER JOIN, LEFT JOIN). Understanding the different types of access predicates and when to use them is crucial for optimal query performance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*wszGHu3HNLo_cX9E" /><figcaption>Photo by <a href="https://unsplash.com/@ustriza?utm_source=medium&amp;utm_medium=referral">rm in</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p><strong>Equality Access Predicate</strong>: This type of access predicate is used when a query has an equality condition on a column that is indexed. It allows the database engine to perform an efficient lookup.</p><p>SELECT * FROM employees WHERE employee_id = 101;</p><p><strong>Range Access Predicate</strong>: Range access predicates are used when a query involves a range of values on an indexed column. This allows the database engine to perform range scans on the index.</p><p>SELECT * FROM products WHERE price BETWEEN 10 AND 50;</p><p><strong>In List Access Predicate</strong>: In list access predicates are used when a query has conditions involving multiple values in an indexed column. It allows the database engine to efficiently look up multiple values.</p><p>SELECT * FROM customers WHERE customer_id IN (101, 102, 103);</p><p><strong>Prefix Access Predicate</strong>: Prefix access predicates are used when a query involves searching for values with a common prefix, often used with text or string columns.</p><p>SELECT * FROM countries WHERE name LIKE ‘Uni%’;</p><p><strong>Full-Text Search Access Predicate</strong>: Full-text search access predicates are used when searching for text within large text columns. They often involve specialized full-text indexes for efficient text search.</p><p>SELECT * FROM articles WHERE MATCH(content) AGAINST(‘database’ IN NATURAL LANGUAGE MODE);</p><p><strong>Spatial Access Predicate</strong>: Spatial access predicates are used when dealing with spatial data and involve geometric shapes or coordinates. These predicates enable efficient spatial queries.</p><p>SELECT * FROM locations WHERE ST_CONTAINS(geography, ST_POINT(-122.349, 47.620));</p><p><strong>Bitmap Access Predicate</strong>: Bitmap access predicates are used in bitmap indexes to efficiently filter rows based on multiple conditions. Each condition generates a bitmap, and they are combined using bitmap operations.</p><p>SELECT * FROM products WHERE color = ‘Red’ AND size = ‘Large’;</p><p><strong>Hash Access Predicate</strong>: Hash access predicates are used in hash indexes to perform efficient equality lookups on a hashed column.</p><p>SELECT * FROM employees WHERE HASH(employee_id) = HASH(101);</p><p><strong>Join Access Predicate</strong>: Join access predicates are used when performing joins between tables. They help optimize the order of table access and join operations.</p><p>SELECT * FROM orders<br>JOIN customers ON orders.customer_id = customers.customer_id<br>WHERE customers.country = ‘USA’;</p><p><strong>Filtering Predicate</strong>: While not strictly an access predicate, filtering predicates are used to further filter rows after the initial access. They can include any type of condition not covered by the other types of access predicates.</p><p>SELECT * FROM products WHERE price &gt; 50 AND category = ‘Electronics’;</p><p>The choice of access predicate depends on the specific query, the available indexes, and the database system being used. Properly selecting and optimizing access predicates is crucial for query performance.</p><p><em>Let’s see an example now…..</em></p><pre>SELECT<br>ip.contract AS contract, ip.part_no AS part_no,<br>Inventory_Part_API.Get_Description(ip.contract, ip.part_no) AS description, ip.dim_quality AS dim_quality,<br>Material_Requis_Supply_API.Decode(ip.supply_code) AS supply_code, ip.supply_code AS supply_code_db, ip.rowkey AS objkey<br>FROM<br>inventory_part_tab ip,<br>inventory_part_planning_tab ip_plan, user_allowed_site_pub ua, part_catalog_pub pc,<br>inventory_part_status_par_pub ips<br>WHERE<br>ip.contract = ua.site<br>AND ip.contract = ip_plan.contract<br>AND ip.part_no = ip_plan.part_no<br>AND ip_plan.planning_method NOT IN (&#39;O&#39;, &#39;T&#39;, &#39;K&#39;)<br>AND ip.part_no = pc.part_no<br>AND pc.position_part = &#39;NOT POSITION PART&#39;<br>AND ip.part_status = ips.part_status<br>AND ips.demand_flag_db = &#39;Y&#39;<br>UNION ALL SELECT<br>contract, part_no,<br>part_description_in_use AS description,<br>NULL AS dim_quality,<br>Material_Requis_Supply_API.Decode(&#39;PO&#39;) AS supply_code,<br>&#39;PO&#39; AS supply_code_db, objkey<br>FROM<br>PURCHASE_PART_LOV6</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WDI-5WLd2vrujV_HgUDtug.png" /><figcaption>Plsql Developer — Explain Plan</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DS-oxQrBEmeogzraMiwUSQ.png" /><figcaption>Plsql Developer — Explain Plan</figcaption></figure><p>Now you know how to use PLSQL Developer — Explain Plan to get an idea of how the access predicates and filter predicates work in your next SQL query</p><p>Happy Learning!!! :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=881c87399723" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Create a mock API by POSTMAN]]></title>
            <link>https://medium.com/@gratia12/create-a-mock-api-by-postman-17950cb03d3f?source=rss-3f9ac404f1aa------2</link>
            <guid isPermaLink="false">https://medium.com/p/17950cb03d3f</guid>
            <category><![CDATA[api]]></category>
            <category><![CDATA[postman]]></category>
            <dc:creator><![CDATA[Gratia Gamage]]></dc:creator>
            <pubDate>Wed, 03 Oct 2018 07:01:56 GMT</pubDate>
            <atom:updated>2018-10-03T07:08:38.031Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*raInUj6NP2K8tP0DtyKcKQ.png" /></figure><p>Why we need mock API’s?</p><p>Imagine a scenario where the end-points aren’t done yet but the UI needs to be started and also the developers need an idea about how the endpoints are going to be. This is where the developers can use a mock API by Postman to simulate the responses of the server. By using this mock API the UI developer can start working and when the endpoint is done he can remove the mock API and connect to the real API.</p><p>Let’s get started with creating a mock API by Postman…</p><p>Make sure you install postman into your system and log into it using an account.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bIbAAJxDmPjZPmGfHRN_1A.png" /><figcaption>-Mock Server function is highlighted</figcaption></figure><p>After logging to the postman, on the top left corner, there’s a plus icon as “New” and when you clicked it you’ll get the window shown here with the functions including “Mock Server” in postman.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*i-Lvcr6k-gzsdnHW3h6jqA.png" /></figure><p>Every mock requires two things.</p><ol><li>A unique path (eg:example)</li><li>A response body(eg: Hi!!!(This can be a text, JSON, XML, HTML))</li></ol><p>In this example I’ve created only one request, but you can create many requests as you want, even changing the method into POST,PUT,DELETE..</p><p>And when you’re done with this step click next and you’ll get a window like I’ve shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7wqLHb7AIAQyRG6nG0dvdg.png" /></figure><p>In this window, under the “Name” you can enter a title to describe the request that you’ve made in the previous step,in simple words just give a name to your mock :)</p><p>By default the mock will be public and anyone will be able to access your mock and if you want to make to private postman has provided the ability to make the mock private by just clicking the checkbox provided in the same window.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tDwdT4e-nJYT5PF9QIY7vw.png" /><figcaption>Your mock is now private</figcaption></figure><p>Go ahead and hit “Create”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wg6fpuo2KkRFU42GK3fM_Q.png" /></figure><p>You’ll get a window similar to this.</p><p>Now Postman has created the mock API for you. And the ‘url’ part of the request you’ve created along with the {{url}}/&lt;…your request path…&gt; is replaced with the value of the mock URL created by the Postman as you can see in this window.</p><p>Hit “Close”…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gFI5enr95_1IcwScvzQCag.png" /></figure><p>You’ll see Postman has created the mock API you’ve created under the collections.Close the window with name of the mock API and you’ll see the request you’ve made with a “GET” and when you hover the mouse over the {{uri}} of the postman request you’ll see the mock uri which Postman has created for you.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IM_dCLgbCtTFXWj5Ba5HAQ.png" /></figure><p>And at the beginning when we were creating the mock you can remember we required two things, one is the path and the other one is the response body.As we’ve created a GET request to get a response body to get a text with a value of “Hi!!” according to my example, we should be able to get the response as “Hi!!”.</p><p>Hit the “Send” button to send your Get Request and there you go.You’ll get the window down below with the response body as “Hi!!”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4TqLcFeVP-YzfJwwCHKitA.png" /></figure><p>And also you can change the response body of your request from a text content to a JSON, HTML and also XML.All you need to do is,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*x-w51UaizWMZdm-f4nM3Cw.png" /></figure><p>As shown in this window Go to the orange color link on the top right corner as “Examples” and when you click it, you’ll get a drop-down and click on the “Default” function.</p><p>Then you’ll get a window similar to the below and in there you can change the response body of your mock as you prefer according to the UI you’re going to create.Down below I’ve created a JSON response body. And then hit “Save Example”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Br-YlzkcDBDAoT-w1LX15g.png" /></figure><p>And now you know what is the response expected after you send your GET request.</p><p>Exactly!You’ll receive a response with a JSON body. I&#39;ve shown the example below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HKbeYStBS8Rh2wNDNSuy6Q.png" /></figure><p>Now you know how to use mock API’s by Postman to create the UI before hand the endpoints.Whether your UI handles a text, JSON , XML or HTML you can use mock API’s.</p><p>Happy Learning!!! :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=17950cb03d3f" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>