{"id":1242,"date":"2022-02-13T20:55:15","date_gmt":"2022-02-14T03:55:15","guid":{"rendered":"https:\/\/bullyrooks.com\/?p=1242"},"modified":"2022-02-13T20:56:57","modified_gmt":"2022-02-14T03:56:57","slug":"kube-cloud-pt3-synchronous-service-interaction","status":"publish","type":"post","link":"https:\/\/bullyrooks.com\/index.php\/2022\/02\/13\/kube-cloud-pt3-synchronous-service-interaction\/","title":{"rendered":"Kube Cloud Pt3 | Synchronous Service Interaction"},"content":{"rendered":"\n<p>In this course I&#8217;m going to show you how to make another spring boot microservice (<code>message-generator<\/code>), deploy it with our first service (<code>cloud-application<\/code>).  I&#8217;ll show how <code>cloud-application<\/code> service can discover <code>message-generator<\/code> via kubernetes services, call an endpoint in <code>message-generato<\/code>r with a feign based REST client as well as how to enhance our component tests to cover that new interaction.  Let&#8217;s get started.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"start-a-new-spring-boot-microservice\">Start a New Spring Boot Microservice<\/h2>\n\n\n\n<p>You&#8217;ll want to <a href=\"https:\/\/bullyrooks.com\/index.php\/2022\/01\/02\/kubernetes-application-hosted-in-the-cloud\/\" data-type=\"post\" data-id=\"1141\">repeat the steps in the first part of this course <\/a>to setup a new microservice.  I&#8217;m not going to go over them here, but here&#8217;s the outline of what is needed:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Create a new github repository (message-generator)<\/li><li>Create a new spring boot application<ul><li>Make sure to include <code>Spring Web<\/code> starter<\/li><li><code>Spring Boot DevTools<\/code><\/li><li><code>Lombok<\/code><\/li><li><\/li><\/ul><\/li><li>Create the repository at canister.io<\/li><li>Create the github action workflows<ul><li>Feature branch<\/li><li>Main branch with deploy<\/li><li>Dependabot<\/li><\/ul><\/li><li>Add the secrets to build and push the image as well as the helm chart<ul><li>CANISTER_USERNAME<\/li><li>CANISTER_PASSWORD<\/li><li>CHART_TOKEN<\/li><li>KUBECONFIG<\/li><\/ul><\/li><\/ul>\n\n\n\n<p>Once I got to a place where everything built and deployed from the base spring boot image, <a href=\"https:\/\/github.com\/bullyrooks\/message-generator\/releases\/tag\/initial\">I tagged it<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"add-a-controller\">Add a Controller<\/h2>\n\n\n\n<p>The goal here is to generate a message to provide to the cloud-application if the user doesn&#8217;t supply a message.  It&#8217;s a bit contrived and not ideally the way I would evolve a service endpoint for cloud-application, but it will do for our demo.<\/p>\n\n\n\n<p>We&#8217;re going to need a controller endpoint and tests.  Lets write that code.<\/p>\n\n\n\n<p>Update pom.xml to add some dependencies:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>    &lt;properties&gt;\n        &lt;java.version&gt;11&lt;\/java.version&gt;\n        &lt;org.mapstruct.version&gt;1.4.2.Final&lt;\/org.mapstruct.version&gt;\n        &lt;javafaker.version&gt;1.0.2&lt;\/javafaker.version&gt;\n    &lt;\/properties&gt;\n...\n        &lt;!-- mapstruct --&gt;\n        &lt;dependency&gt;\n            &lt;groupId&gt;org.mapstruct&lt;\/groupId&gt;\n            &lt;artifactId&gt;mapstruct&lt;\/artifactId&gt;\n            &lt;version&gt;${org.mapstruct.version}&lt;\/version&gt;\n        &lt;\/dependency&gt;\n        &lt;dependency&gt;\n            &lt;groupId&gt;org.mapstruct&lt;\/groupId&gt;\n            &lt;artifactId&gt;mapstruct-processor&lt;\/artifactId&gt;\n            &lt;version&gt;${org.mapstruct.version}&lt;\/version&gt;\n        &lt;\/dependency&gt;\n        &lt;dependency&gt;\n            &lt;groupId&gt;com.github.javafaker&lt;\/groupId&gt;\n            &lt;artifactId&gt;javafaker&lt;\/artifactId&gt;\n            &lt;version&gt;${javafaker.version}&lt;\/version&gt;\n        &lt;\/dependency&gt;<\/code><\/pre>\n\n\n\n<p>First create a <code>service <\/code>package in <code>src\/main\/java\/com\/bullyrooks\/messagegenerator\/<\/code> and add a <code>MessageSerivce.java<\/code> class with this code: <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>package com.bullyrooks.messagegenerator.service;\n\nimport com.github.javafaker.Faker;\nimport org.springframework.stereotype.Service;\n\n@Service\npublic class MessageService {\n    Faker faker = new Faker();\n\n    public String getMessage(){\n        return faker.gameOfThrones().quote();\n    }\n}\n<\/code><\/pre>\n\n\n\n<p>I&#8217;m using the faker library to generate some random text, because that&#8217;s what its good for.<\/p>\n\n\n\n<p>Now create a <code>controller <\/code>package in <code>src\/main\/java\/com\/bullyrooks\/messagegenerator\/<\/code> and add a <code>MessageController.java<\/code> class with this code:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>package com.bullyrooks.messagegenerator.controller;\n\nimport com.bullyrooks.messagegenerator.controller.dto.MessageResponseDTO;\nimport com.bullyrooks.messagegenerator.service.MessageService;\nimport org.springframework.beans.factory.annotation.Autowired;\nimport org.springframework.web.bind.annotation.GetMapping;\nimport org.springframework.web.bind.annotation.RestController;\n\n@RestController\npublic class MessageController {\n    @Autowired\n    MessageService messageService;\n\n    @GetMapping(\"\/message\")\n    public MessageResponseDTO getMessage(){\n\n        return MessageResponseDTO.builder()\n                .message(messageService.getMessage())\n                .build();\n    }\n}\n<\/code><\/pre>\n\n\n\n<p>We&#8217;ll need a dto as well.  Create a <code>dto <\/code>package under <code>controller<\/code>.  Create a class called <code>MessageResponseDTO <\/code>with this content<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>package com.bullyrooks.messagegenerator.controller.dto;\n\nimport lombok.AllArgsConstructor;\nimport lombok.Builder;\nimport lombok.Data;\nimport lombok.NoArgsConstructor;\n\n@Data\n@Builder\n@AllArgsConstructor\n@NoArgsConstructor\npublic class MessageResponseDTO {\n\n    private String message;\n}\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"write-a-test\">Write a Test<\/h2>\n\n\n\n<p> Create a <code>controller <\/code>package in <code>src\/test\/java\/com\/bullyrooks\/messagegenerator\/<\/code>.  Create a class called <code>MessageControllerTest.java<\/code> with this code<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>package com.bullyrooks.messagegenerator.controller;\n\nimport com.bullyrooks.messagegenerator.controller.dto.MessageResponseDTO;\nimport com.fasterxml.jackson.core.JsonProcessingException;\nimport lombok.extern.slf4j.Slf4j;\nimport org.apache.commons.lang3.StringUtils;\nimport org.junit.jupiter.api.Test;\nimport org.junit.jupiter.api.extension.ExtendWith;\nimport org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;\nimport org.springframework.boot.test.context.SpringBootTest;\nimport org.springframework.boot.web.server.LocalServerPort;\nimport org.springframework.http.HttpHeaders;\nimport org.springframework.http.MediaType;\nimport org.springframework.http.ResponseEntity;\nimport org.springframework.test.context.junit.jupiter.SpringExtension;\nimport org.springframework.web.client.RestTemplate;\n\nimport java.net.URI;\nimport java.net.URISyntaxException;\n\nimport static org.junit.jupiter.api.Assertions.assertEquals;\nimport static org.junit.jupiter.api.Assertions.assertTrue;\n\n@ExtendWith(SpringExtension.class)\n@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)\n@Slf4j\n@AutoConfigureMockMvc\npublic class MessageControllerTest {\n    @LocalServerPort\n    int randomServerPort;\n\n    @Test\n    void testAddCustomerSuccess() throws URISyntaxException, JsonProcessingException {\n        RestTemplate restTemplate = new RestTemplate();\n        String baseUrl = \"http:\/\/localhost:\" + randomServerPort + \"\/message\";\n        URI uri = new URI(baseUrl);\n\n        HttpHeaders headers = new HttpHeaders();\n        headers.set(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE);\n\n        ResponseEntity&lt;MessageResponseDTO&gt; result = restTemplate.getForEntity(uri, MessageResponseDTO.class);\n\n        \/\/Verify request succeed\n        assertEquals(200, result.getStatusCodeValue());\n        MessageResponseDTO response = result.getBody();\n        log.info(\"Test message returned: {}\",response.getMessage());\n        assertTrue(StringUtils.isNotBlank(response.getMessage()));\n    }\n}\n<\/code><\/pre>\n\n\n\n<p>Now run the test, you should see it pass with some output like this:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>2022-01-23 14:44:15.493  INFO 24748 --- &#91;o-auto-1-exec-1] o.a.c.c.C.&#91;Tomcat].&#91;localhost].&#91;\/]       : Initializing Spring DispatcherServlet 'dispatcherServlet'\n2022-01-23 14:44:15.493  INFO 24748 --- &#91;o-auto-1-exec-1] o.s.web.servlet.DispatcherServlet        : Initializing Servlet 'dispatcherServlet'\n2022-01-23 14:44:15.494  INFO 24748 --- &#91;o-auto-1-exec-1] o.s.web.servlet.DispatcherServlet        : Completed initialization in 1 ms\n2022-01-23 14:44:15.657  INFO 24748 --- &#91;           main] c.b.m.controller.MessageControllerTest   : Test message returned: Do the dead frighten you?<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"kubernetes-config\">Kubernetes Config<\/h2>\n\n\n\n<p>Although this will deploy and startup, it will conflict with the port that cloud-application is already running on.  We can fix that quickly by updating the <code>values.yaml<\/code> like this:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>service:\n  type: NodePort\n  port: <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\">8081\n<\/mark>\n  targetPort: 8080\n\nport:\n  containerPort: <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\">8081\n<\/mark>\n<\/code><\/pre>\n\n\n\n<p>This is very similar to what would happen if we ran both cloud-application and message-generator locally with the default config (listening on port 8080).<a href=\"https:\/\/www.baeldung.com\/spring-boot-change-port\">  You can fix that by modifying the application.yml of one of them by adding this config<\/a>:  If you do that, make sure that the <code>server.port<\/code> config matches your <code>targetPort<\/code> in the <code>values.yaml<\/code><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>server:\n  port : 8081<\/code><\/pre>\n\n\n\n<p>Lets go ahead and commit onto <code>main<\/code>.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ git add .\nwarning: LF will be replaced by CRLF in pom.xml.\nThe file will have its original line endings in your working directory\n\n$ git commit -m \"message generating endpoint\"\n&#91;main 1057d9c] message generating endpoint\n 5 files changed, 116 insertions(+)\n create mode 100644 src\/main\/java\/com\/bullyrooks\/messagegenerator\/controller\/MessageController.java\nCompressing objects: 100% (14\/14), done.\nWriting objects: 100% (22\/22), 2.82 KiB | 963.00 KiB\/s, done.\nTotal 22 (delta 2), reused 0 (delta 0), pack-reused 0\nremote: Resolving deltas: 100% (2\/2), completed with 2 local objects.\nTo github.com-bullyrook:bullyrooks\/message-generator.git\n   6e91180..1057d9c  main -&gt; main\n\n$ git push<\/code><\/pre>\n\n\n\n<p>And we should see it build and deploy to Okteto<\/p>\n\n\n\n<p>The build should pass<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"851\" height=\"88\" src=\"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2022\/01\/image-44.png?resize=851%2C88&#038;ssl=1\" alt=\"\" class=\"wp-image-1245\" srcset=\"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2022\/01\/image-44.png?w=851&amp;ssl=1 851w, https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2022\/01\/image-44.png?resize=300%2C31&amp;ssl=1 300w, https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2022\/01\/image-44.png?resize=768%2C79&amp;ssl=1 768w\" sizes=\"auto, (max-width: 851px) 100vw, 851px\" data-recalc-dims=\"1\" \/><\/figure>\n\n\n\n<p>We should see it deploy from the pipeline<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Setting up kubectl configuration\nPreparing helm execution\nExecuting helm\n\"***\" has been added to your repositories\nHang tight while we grab the latest from your chart repositories...\n...Successfully got an update from the \"***\" chart repository\nUpdate Complete. \u2388Happy Helming!\u2388\nRelease \"message-generator\" has been upgraded. Happy Helming!\nNAME: message-generator\nLAST DEPLOYED: Sun Jan 23 21:48:24 2022\nNAMESPACE: ***\nSTATUS: deployed\nREVISION: 3\nNOTES:\n1. Get the application URL by running these commands:\n  export NODE_PORT=$(kubectl get --namespace *** -o jsonpath=\"{.spec.ports&#91;0].nodePort}\" services message-generator)\n  export NODE_IP=$(kubectl get nodes --namespace *** -o jsonpath=\"{.items&#91;0].status.addresses&#91;0].address}\")\n  echo http:\/\/$NODE_IP:$NODE_PORT<\/code><\/pre>\n\n\n\n<p>And see it start up in Okteto<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"960\" height=\"424\" src=\"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2022\/01\/image-45-1024x452.png?resize=960%2C424&#038;ssl=1\" alt=\"\" class=\"wp-image-1246\" srcset=\"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2022\/01\/image-45.png?resize=1024%2C452&amp;ssl=1 1024w, https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2022\/01\/image-45.png?resize=300%2C132&amp;ssl=1 300w, https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2022\/01\/image-45.png?resize=768%2C339&amp;ssl=1 768w, https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2022\/01\/image-45.png?resize=1536%2C677&amp;ssl=1 1536w, https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2022\/01\/image-45.png?w=1728&amp;ssl=1 1728w\" sizes=\"auto, (max-width: 960px) 100vw, 960px\" data-recalc-dims=\"1\" \/><\/figure>\n\n\n\n<p>And confirm we can hit the endpoint via postman<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"869\" height=\"656\" src=\"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2022\/01\/image-46.png?resize=869%2C656&#038;ssl=1\" alt=\"\" class=\"wp-image-1247\" srcset=\"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2022\/01\/image-46.png?w=869&amp;ssl=1 869w, https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2022\/01\/image-46.png?resize=300%2C226&amp;ssl=1 300w, https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2022\/01\/image-46.png?resize=768%2C580&amp;ssl=1 768w\" sizes=\"auto, (max-width: 869px) 100vw, 869px\" data-recalc-dims=\"1\" \/><\/figure>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"entry-summary\">\nIn this course I&#8217;m going to show you how to make another&hellip;\n<\/div>\n<div class=\"link-more\"><a href=\"https:\/\/bullyrooks.com\/index.php\/2022\/02\/13\/kube-cloud-pt3-synchronous-service-interaction\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &ldquo;Kube Cloud Pt3 | Synchronous Service Interaction&rdquo;<\/span>&hellip;<\/a><\/div>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[41],"tags":[80,55,57,43],"course":[161],"class_list":["post-1242","post","type-post","status-publish","format-standard","hentry","category-software-development","tag-kubernetes","tag-microservice","tag-rest","tag-spring-boot","course-kubernetes-application-hosted-in-the-cloud-pt-3","entry"],"jetpack_featured_media_url":"","jetpack-related-posts":[{"id":1141,"url":"https:\/\/bullyrooks.com\/index.php\/2022\/01\/02\/kubernetes-application-hosted-in-the-cloud\/","url_meta":{"origin":1242,"position":0},"title":"Kubernetes Application Hosted in the Cloud","author":"Bullyrook","date":"January 2, 2022","format":false,"excerpt":"It's been a few years since my last spring boot based kubernetes application. That course ended with a microservice deployed into kubernetes via minikube locally. I'm using this course to expand on that effort. In this course I'm going to show a few ways to do the same things in\u2026","rel":"","context":"In &quot;Software Development&quot;","block_context":{"text":"Software Development","link":"https:\/\/bullyrooks.com\/index.php\/category\/software-development\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":815,"url":"https:\/\/bullyrooks.com\/index.php\/2020\/03\/30\/simple-spring-boot-service-to-kubernetes-application-step-14-8e1ade0b7b84\/","url_meta":{"origin":1242,"position":1},"title":"System Design","author":"Bullyrook","date":"March 30, 2020","format":false,"excerpt":"We\u2019ve successfully deployed a service and confirmed that its accessible. However, a single service doesn\u2019t make an app. We now need to fill out the rest of the application and introduce some best practices around service governance and system engineering. The Application Design We\u2019re going to be organizing the UI\u2026","rel":"","context":"In &quot;Software Development&quot;","block_context":{"text":"Software Development","link":"https:\/\/bullyrooks.com\/index.php\/category\/software-development\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":819,"url":"https:\/\/bullyrooks.com\/index.php\/2020\/03\/30\/simple-spring-boot-service-to-kubernetes-application-step-3-f03bdfe30ceb\/","url_meta":{"origin":1242,"position":2},"title":"Building a Service Layer","author":"Bullyrook","date":"March 30, 2020","format":false,"excerpt":"In this stage we\u2019re going to build out the service or logical layer of our microservice. I\u2019ll explain adapter and port or hexagonal architecture and covering the usage of mapstruct. Service Design Ports and adapter or hexagonal design is a well discussed concept, so I\u2019m not going to go into\u2026","rel":"","context":"In &quot;Software Development&quot;","block_context":{"text":"Software Development","link":"https:\/\/bullyrooks.com\/index.php\/category\/software-development\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1258,"url":"https:\/\/bullyrooks.com\/index.php\/2022\/02\/13\/kube-cloud-pt3-rest-interaction\/","url_meta":{"origin":1242,"position":3},"title":"Kube Cloud Pt3 | REST Interaction","author":"Bullyrook","date":"February 13, 2022","format":false,"excerpt":"Now that we've got a new service, we're going to make it discoverable via kubernetes and call it from the cloud application service. Enable Kubernetes Features Let's start a new branch in our cloud_application project $ git checkout -b kube Switched to a new branch 'kube' Edit the pom.xml and\u2026","rel":"","context":"In &quot;Software Development&quot;","block_context":{"text":"Software Development","link":"https:\/\/bullyrooks.com\/index.php\/category\/software-development\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2022\/02\/image.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2022\/02\/image.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2022\/02\/image.png?resize=700%2C400&ssl=1 2x, https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2022\/02\/image.png?resize=1050%2C600&ssl=1 3x"},"classes":[]},{"id":1153,"url":"https:\/\/bullyrooks.com\/index.php\/2022\/01\/02\/cloud-kube-simple-rest-endpoint-and-test\/","url_meta":{"origin":1242,"position":4},"title":"Cloud Kube | Simple REST Endpoint and Test","author":"Bullyrook","date":"January 2, 2022","format":false,"excerpt":"In the previous article we created the skeleton repo and project. In this article we'll be building a very basic endpoint and component test. Although I do hate hello world examples my intent is to get us to a point where we can focus on the build and deploy path.\u2026","rel":"","context":"In &quot;Software Development&quot;","block_context":{"text":"Software Development","link":"https:\/\/bullyrooks.com\/index.php\/category\/software-development\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2022\/01\/image-11.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":1264,"url":"https:\/\/bullyrooks.com\/index.php\/2022\/02\/13\/kube-cloud-pt3-health-indicators\/","url_meta":{"origin":1242,"position":5},"title":"Kube Cloud Pt3 | Health Indicators","author":"Bullyrook","date":"February 13, 2022","format":false,"excerpt":"Spring offers a way to tell if your services and their dependent resources are up and healthy. Kubernetes can leverage this functionality via their liveness and readiness probes to report if pods are available to service requests. In this session, we're going to enable and connect those health checks. Enable\u2026","rel":"","context":"In &quot;Software Development&quot;","block_context":{"text":"Software Development","link":"https:\/\/bullyrooks.com\/index.php\/category\/software-development\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2022\/02\/image-4.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2022\/02\/image-4.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2022\/02\/image-4.png?resize=700%2C400&ssl=1 2x"},"classes":[]}],"_links":{"self":[{"href":"https:\/\/bullyrooks.com\/index.php\/wp-json\/wp\/v2\/posts\/1242","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bullyrooks.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bullyrooks.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bullyrooks.com\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/bullyrooks.com\/index.php\/wp-json\/wp\/v2\/comments?post=1242"}],"version-history":[{"count":6,"href":"https:\/\/bullyrooks.com\/index.php\/wp-json\/wp\/v2\/posts\/1242\/revisions"}],"predecessor-version":[{"id":1273,"href":"https:\/\/bullyrooks.com\/index.php\/wp-json\/wp\/v2\/posts\/1242\/revisions\/1273"}],"wp:attachment":[{"href":"https:\/\/bullyrooks.com\/index.php\/wp-json\/wp\/v2\/media?parent=1242"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bullyrooks.com\/index.php\/wp-json\/wp\/v2\/categories?post=1242"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bullyrooks.com\/index.php\/wp-json\/wp\/v2\/tags?post=1242"},{"taxonomy":"course","embeddable":true,"href":"https:\/\/bullyrooks.com\/index.php\/wp-json\/wp\/v2\/course?post=1242"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}