{"id":1258,"date":"2022-02-13T20:58:39","date_gmt":"2022-02-14T03:58:39","guid":{"rendered":"https:\/\/bullyrooks.com\/?p=1258"},"modified":"2022-02-13T20:58:39","modified_gmt":"2022-02-14T03:58:39","slug":"kube-cloud-pt3-rest-interaction","status":"publish","type":"post","link":"https:\/\/bullyrooks.com\/index.php\/2022\/02\/13\/kube-cloud-pt3-rest-interaction\/","title":{"rendered":"Kube Cloud Pt3 | REST Interaction"},"content":{"rendered":"\n<p>Now that we&#8217;ve got a new service, we&#8217;re going to make it discoverable via kubernetes and call it from the cloud application service.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"enable-kubernetes-features\">Enable Kubernetes Features<\/h2>\n\n\n\n<p>Let&#8217;s start a new branch in our <code>cloud_application<\/code> project<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ git checkout -b kube\r\nSwitched to a new branch 'kube'<\/code><\/pre>\n\n\n\n<p>Edit the <code>pom.xml<\/code> and add a new dependencies to enable kubernetes functions<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>    &lt;properties>\r\n        ...\r\n        &lt;spring-cloud.version>2021.0.0&lt;\/spring-cloud.version>\r\n    &lt;\/properties> \n\n...\n\n        &lt;!-- REST Client -->\r\n        &lt;dependency>\r\n            &lt;groupId>org.springframework.cloud&lt;\/groupId>\r\n            &lt;artifactId>spring-cloud-starter-openfeign&lt;\/artifactId>\r\n        &lt;\/dependency>\r\n        &lt;!-- kubernetes -->\r\n        &lt;dependency>\r\n            &lt;groupId>org.springframework.cloud&lt;\/groupId>\r\n            &lt;artifactId>spring-cloud-starter-kubernetes-fabric8-all&lt;\/artifactId>\r\n        &lt;\/dependency>\r\n\r\n...\n    &lt;\/dependencies>\r\n    &lt;dependencyManagement>\r\n        &lt;dependencies>\r\n            &lt;dependency>\r\n                &lt;groupId>org.springframework.cloud&lt;\/groupId>\r\n                &lt;artifactId>spring-cloud-dependencies&lt;\/artifactId>\r\n                &lt;version>${spring-cloud.version}&lt;\/version>\r\n                &lt;type>pom&lt;\/type>\r\n                &lt;scope>import&lt;\/scope>\r\n            &lt;\/dependency>\r\n        &lt;\/dependencies>\r\n    &lt;\/dependencyManagement>\r\n<\/code><\/pre>\n\n\n\n<p>Here&#8217;s what&#8217;s going on.  Were adding a dependency management clause to allow us to bring in the spring cloud starters.  Then we&#8217;re using the correct version of spring cloud so that it will be compatible with our spring boot version.  Next, we&#8217;re adding feign client which will allow us to build a declarative rest client.  Finally, we&#8217;re adding the fabric 8 framework that allows our spring boot application to interact with kubernetes.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"create-the-rest-client\">Create the REST Client<\/h2>\n\n\n\n<p>Create the following packages under <code>src\/main\/java<\/code><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>com.bullyrooks.cloud_application.message_generator\ncom.bullyrooks.cloud_application.message_generator.client\ncom.bullyrooks.cloud_application.message_generator.client.dto\n<\/code><\/pre>\n\n\n\n<p>Now create a class called <code>MessageResponseDTO <\/code>in <code>com.bullyrooks.cloud_application.message_generator.client.dto<\/code> with this content:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>package com.bullyrooks.cloud_application.message_generator.client.dto;\r\n\r\nimport lombok.AllArgsConstructor;\r\nimport lombok.Builder;\r\nimport lombok.Data;\r\nimport lombok.NoArgsConstructor;\r\n\r\n@Data\r\n@Builder\r\n@AllArgsConstructor\r\n@NoArgsConstructor\r\npublic class MessageResponseDTO {\r\n\r\n    private String message;\r\n}\r\n<\/code><\/pre>\n\n\n\n<p>This will be the DTO that receives the response payload from the Message-generator service.<\/p>\n\n\n\n<p>Next make an <strong>interface <\/strong>called <code>MessageGeneratorClient <\/code>in <code>com.bullyrooks.cloud_application.message_generator.client<\/code>.  Add this content<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>package com.bullyrooks.cloud_application.message_generator.client;\r\n\r\nimport com.bullyrooks.cloud_application.message_generator.client.dto.MessageResponseDTO;\r\nimport org.springframework.cloud.openfeign.FeignClient;\r\nimport org.springframework.http.MediaType;\r\nimport org.springframework.web.bind.annotation.GetMapping;\r\n\r\n@FeignClient(name = \"message-generator\")\r\npublic interface MessageGeneratorClient {\r\n    @GetMapping(value = \"\/message\",\r\n            produces = MediaType.APPLICATION_JSON_VALUE,\r\n            consumes = MediaType.APPLICATION_JSON_VALUE)\r\n    MessageResponseDTO getMessage();\r\n}\r\n<\/code><\/pre>\n\n\n\n<p>Next, we need to enable the kubernetes and feign client functionality.  Edit <code>CloudApplication <\/code>in <code>com.bullyrooks.cloud_application<\/code> and add these annotations<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>@SpringBootApplication\r\n<span style=\"text-decoration: underline;\">@<\/span>EnableDiscoveryClient\r\n@EnableFeignClients\r\npublic class CloudApplication {<\/code><\/pre>\n\n\n\n<p>Now we want to make sure that we can call the client from our service layer.  Update <code>MessageService <\/code>with this code<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>package com.bullyrooks.cloud_application.service;\r\n\r\nimport com.bullyrooks.cloud_application.message_generator.client.MessageGeneratorClient;\r\nimport com.bullyrooks.cloud_application.message_generator.client.dto.MessageResponseDTO;\r\nimport com.bullyrooks.cloud_application.repository.MessageRepository;\r\nimport com.bullyrooks.cloud_application.repository.document.MessageDocument;\r\nimport com.bullyrooks.cloud_application.repository.mapper.MessageDocumentMapper;\r\nimport com.bullyrooks.cloud_application.service.model.Message;\r\nimport lombok.extern.slf4j.Slf4j;\r\nimport org.apache.commons.lang3.StringUtils;\r\nimport org.springframework.beans.factory.annotation.Autowired;\r\nimport org.springframework.stereotype.Service;\r\n\r\n@Service\r\n@Slf4j\r\npublic class MessageService {\r\n\r\n    @Autowired\r\n    MessageRepository messageRepository;\r\n\r\n    @Autowired\r\n    MessageGeneratorClient messageGeneratorClient;\r\n\r\n    public Message saveMessage(Message message){\r\n        if (StringUtils.isEmpty(message.getMessage())){\r\n            log.info(\"No message, retrieve from message generator\");\r\n            MessageResponseDTO dto = messageGeneratorClient.getMessage();\r\n            message.setMessage(dto.getMessage());\r\n            log.info(\"retrieved message: {}\", message.getMessage());\r\n        }\r\n\r\n        MessageDocument msgDoc = MessageDocumentMapper.INSTANCE.modelToDocument(message);\r\n\r\n        log.info(\"saving document: {}\", msgDoc);\r\n        MessageDocument returnDoc = messageRepository.save(msgDoc);\r\n        return MessageDocumentMapper.INSTANCE.documentToModel(returnDoc);\r\n    }\r\n}\r\n<\/code><\/pre>\n\n\n\n<p>Here we&#8217;ve added the autowire for the new client application as well as a call to the message generator service if a message was not passed in.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"testing\">Testing<\/h2>\n\n\n\n<p>Now we&#8217;ll update <code>MessageControllerTest<\/code> to add some tests for the new behavior<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>...\n    @MockBean\r\n    MessageGeneratorClient messageGeneratorClient;\r\n...\n    @Test\r\n    void testGetReturnsMessageIfMissing(){\r\n        Long userId = 1l;\r\n\r\n        \/\/given\r\n        CreateMessageRequestDTO request = CreateMessageRequestDTO\r\n                .builder()\r\n                .firstName(faker.name().firstName())\r\n                .lastName(faker.name().lastName())\r\n                .build();\r\n\r\n        when(messageGeneratorClient.getMessage()).thenReturn(\r\n                MessageResponseDTO.builder()\r\n                .message(faker.gameOfThrones().quote())\r\n                .build());\r\n\r\n        \/\/when\r\n        RestTemplate restTemplate = new RestTemplate();\r\n        String baseUrl = \"http:\/\/localhost:\" + randomServerPort + MESSAGE_PATH;\r\n        UriComponents builder = UriComponentsBuilder.fromHttpUrl(baseUrl)\r\n                .build();\r\n\r\n        ResponseEntity&lt;CreateMessageResponseDTO> result = restTemplate.postForEntity(\r\n                builder.toUri(), request, CreateMessageResponseDTO.class);\r\n\r\n        \/\/then\r\n        CreateMessageResponseDTO dto = result.getBody();\r\n        assertEquals(request.getFirstName(), dto.getFirstName());\r\n        assertEquals(request.getLastName(), dto.getLastName());\r\n        assertTrue(StringUtils.isNotBlank(dto.getMessage()));\r\n\r\n        MessageDocument savedDoc = messageRepository.findById(dto.getMessageId()).get();\r\n        assertEquals(request.getFirstName(), savedDoc.getFirstName());\r\n        assertEquals(request.getLastName(), savedDoc.getLastName());\r\n        assertEquals(dto.getMessage(), savedDoc.getMessage());\r\n    }\r\n<\/code><\/pre>\n\n\n\n<p>As you can see in this test, we&#8217;re not passing in a <code>message <\/code>field in the body of the request.  We&#8217;re also adding a mock that says when the feign client is called, return a new quote.  Most of the rest should look familiar except, since we don&#8217;t know the message, we&#8217;re just testing if we got a non-null response back and confirm that the message that was returned is the same one that is stored in the database.<\/p>\n\n\n\n<p>Go ahead and run the test.  It should pass.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"commit-and-push\">Commit and push<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>git add .\ngit commit -m \"retrieve message from message generator if missing\"\ngit push --set-upstream origin kube<\/code><\/pre>\n\n\n\n<p>This should successfully build on the feature branch.  If it does, go ahead and merge to main to deploy it to okteto<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>git checkout main\ngit merge kube\ngit push<\/code><\/pre>\n\n\n\n<p>This should again successfully build and you should see it get deployed to okteto.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"960\" height=\"447\" src=\"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2022\/02\/image-1024x477.png?resize=960%2C447&#038;ssl=1\" alt=\"\" class=\"wp-image-1259\" srcset=\"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2022\/02\/image.png?resize=1024%2C477&amp;ssl=1 1024w, https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2022\/02\/image.png?resize=300%2C140&amp;ssl=1 300w, https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2022\/02\/image.png?resize=768%2C358&amp;ssl=1 768w, https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2022\/02\/image.png?w=1251&amp;ssl=1 1251w\" sizes=\"auto, (max-width: 960px) 100vw, 960px\" data-recalc-dims=\"1\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"960\" height=\"370\" src=\"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2022\/02\/image-1-1024x395.png?resize=960%2C370&#038;ssl=1\" alt=\"\" class=\"wp-image-1260\" srcset=\"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2022\/02\/image-1.png?resize=1024%2C395&amp;ssl=1 1024w, https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2022\/02\/image-1.png?resize=300%2C116&amp;ssl=1 300w, https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2022\/02\/image-1.png?resize=768%2C296&amp;ssl=1 768w, https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2022\/02\/image-1.png?resize=1536%2C592&amp;ssl=1 1536w, https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2022\/02\/image-1.png?w=1548&amp;ssl=1 1548w\" sizes=\"auto, (max-width: 960px) 100vw, 960px\" data-recalc-dims=\"1\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"manual-test\">Manual Test<\/h2>\n\n\n\n<p>Lets just double check with postman<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"960\" height=\"709\" src=\"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2022\/02\/image-2.png?resize=960%2C709&#038;ssl=1\" alt=\"\" class=\"wp-image-1261\" srcset=\"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2022\/02\/image-2.png?w=984&amp;ssl=1 984w, https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2022\/02\/image-2.png?resize=300%2C222&amp;ssl=1 300w, https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2022\/02\/image-2.png?resize=768%2C567&amp;ssl=1 768w\" sizes=\"auto, (max-width: 960px) 100vw, 960px\" data-recalc-dims=\"1\" \/><\/figure>\n\n\n\n<p>And confirm in the okteto logs<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"960\" height=\"110\" src=\"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2022\/02\/image-3-1024x117.png?resize=960%2C110&#038;ssl=1\" alt=\"\" class=\"wp-image-1262\" srcset=\"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2022\/02\/image-3.png?resize=1024%2C117&amp;ssl=1 1024w, https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2022\/02\/image-3.png?resize=300%2C34&amp;ssl=1 300w, https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2022\/02\/image-3.png?resize=768%2C88&amp;ssl=1 768w, https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2022\/02\/image-3.png?w=1225&amp;ssl=1 1225w\" sizes=\"auto, (max-width: 960px) 100vw, 960px\" data-recalc-dims=\"1\" \/><\/figure>\n\n\n\n<p>Congratulations, you just got two microservices to communicate with each other in a cloud hosted kubernetes environment!<\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"entry-summary\">\nNow that we&#8217;ve got a new service, we&#8217;re going to make it&hellip;\n<\/div>\n<div class=\"link-more\"><a href=\"https:\/\/bullyrooks.com\/index.php\/2022\/02\/13\/kube-cloud-pt3-rest-interaction\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &ldquo;Kube Cloud Pt3 | REST 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,57,43],"course":[161],"class_list":["post-1258","post","type-post","status-publish","format-standard","hentry","category-software-development","tag-kubernetes","tag-rest","tag-spring-boot","course-kubernetes-application-hosted-in-the-cloud-pt-3","entry"],"jetpack_featured_media_url":"","jetpack-related-posts":[{"id":1242,"url":"https:\/\/bullyrooks.com\/index.php\/2022\/02\/13\/kube-cloud-pt3-synchronous-service-interaction\/","url_meta":{"origin":1258,"position":0},"title":"Kube Cloud Pt3 | Synchronous Service Interaction","author":"Bullyrook","date":"February 13, 2022","format":false,"excerpt":"In this course I'm going to show you how to make another spring boot microservice (message-generator), deploy it with our first service (cloud-application). I'll show how cloud-application service can discover message-generator via kubernetes services, call an endpoint in message-generator with a feign based REST client as well as how to\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-45.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2022\/01\/image-45.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2022\/01\/image-45.png?resize=700%2C400&ssl=1 2x, https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2022\/01\/image-45.png?resize=1050%2C600&ssl=1 3x, https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2022\/01\/image-45.png?resize=1400%2C800&ssl=1 4x"},"classes":[]},{"id":1356,"url":"https:\/\/bullyrooks.com\/index.php\/2022\/02\/27\/kube-cloud-pt5-create-an-event-consumer\/","url_meta":{"origin":1258,"position":1},"title":"Kube Cloud Pt5 | Create an Event Consumer","author":"Bullyrook","date":"February 27, 2022","format":false,"excerpt":"Now that we've got messages being published to kafka, we are going to need to build our consumer that receives those events and stores them into the mongo database. Go ahead and create a new repository called message-repository according to the microservice startup course here. This is the pom.xml that\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-49.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2022\/02\/image-49.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2022\/02\/image-49.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":1264,"url":"https:\/\/bullyrooks.com\/index.php\/2022\/02\/13\/kube-cloud-pt3-health-indicators\/","url_meta":{"origin":1258,"position":2},"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":[]},{"id":829,"url":"https:\/\/bullyrooks.com\/index.php\/2020\/03\/30\/simple-spring-boot-service-to-kubernetes-application-step-15-34e1bba8351b\/","url_meta":{"origin":1258,"position":3},"title":"Messaging and Event Driven Design","author":"Bullyrook","date":"March 30, 2020","format":false,"excerpt":"In order publish messages, we need a message broker and add some logic to use the message broker. We\u2019re going to use a cloud based SaaS service as a message broker and use spring cloud stream to interact with it. Setup the Message\u00a0Broker We\u2019ll need a message broker in order\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":1229,"url":"https:\/\/bullyrooks.com\/index.php\/2022\/01\/23\/kube-cloud-pt2-automated-testing-with-testcontainers\/","url_meta":{"origin":1258,"position":4},"title":"Kube Cloud Pt2 | Automated Testing with TestContainers","author":"Bullyrook","date":"January 23, 2022","format":false,"excerpt":"In the last section we implemented service endpoint that stored data in a mongodb backend. In this session we're going to build a component test to automatically verify that functionality. TestContainer Overview TestContainers allow us to mock external resources with a docker based implementation. This is similar to \"regular\" mocking\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":1339,"url":"https:\/\/bullyrooks.com\/index.php\/2022\/02\/27\/kube-cloud-pt5-create-an-event-publisher\/","url_meta":{"origin":1258,"position":5},"title":"Kube Cloud Pt5 | Create an Event Publisher","author":"Bullyrook","date":"February 27, 2022","format":false,"excerpt":"We're going to be updating cloud-application to remove the mongodb repository logic and replace it with an event publisher. Create a new branch from main git checkout -b migrate Update the pom.xml first, remove the mongodb dependencies <dependency> <groupId>org.springframework.boot<\/groupId> <artifactId>spring-boot-starter-data-mongodb<\/artifactId> <\/dependency> ... <dependency> <groupId>org.testcontainers<\/groupId> <artifactId>mongodb<\/artifactId> <version>1.16.3<\/version> <scope>test<\/scope> <\/dependency> and add\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-39.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2022\/02\/image-39.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2022\/02\/image-39.png?resize=700%2C400&ssl=1 2x"},"classes":[]}],"_links":{"self":[{"href":"https:\/\/bullyrooks.com\/index.php\/wp-json\/wp\/v2\/posts\/1258","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=1258"}],"version-history":[{"count":2,"href":"https:\/\/bullyrooks.com\/index.php\/wp-json\/wp\/v2\/posts\/1258\/revisions"}],"predecessor-version":[{"id":1274,"href":"https:\/\/bullyrooks.com\/index.php\/wp-json\/wp\/v2\/posts\/1258\/revisions\/1274"}],"wp:attachment":[{"href":"https:\/\/bullyrooks.com\/index.php\/wp-json\/wp\/v2\/media?parent=1258"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bullyrooks.com\/index.php\/wp-json\/wp\/v2\/categories?post=1258"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bullyrooks.com\/index.php\/wp-json\/wp\/v2\/tags?post=1258"},{"taxonomy":"course","embeddable":true,"href":"https:\/\/bullyrooks.com\/index.php\/wp-json\/wp\/v2\/course?post=1258"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}